# Solid cooking fuel, kitchen arrangement and child haemoglobin
# Data: NFHS-5 (2019-21), children aged 6-59 months
library(tidyverse)── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.2.1 ✔ readr 2.2.0
✔ forcats 1.0.1 ✔ stringr 1.6.0
✔ ggplot2 4.0.3 ✔ tibble 3.3.1
✔ lubridate 1.9.5 ✔ tidyr 1.3.2
✔ purrr 1.2.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(survey)Loading required package: grid
Loading required package: Matrix
Attaching package: 'Matrix'
The following objects are masked from 'package:tidyr':
expand, pack, unpack
Loading required package: survival
Attaching package: 'survey'
The following object is masked from 'package:graphics':
dotchart
library(broom)
setwd("~/Desktop/Statistics Research")
nfhs <- read_csv("nfhs5_final_analysis.csv")Rows: 181378 Columns: 15
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (5): case_id, mother_edu, wealth, region, state
dbl (10): psu, strata, weight, child_hb, solid_fuel, no_sep_kitchen, child_a...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
glimpse(nfhs)Rows: 181,378
Columns: 15
$ case_id <chr> "0100101399-02_1", "0100101357-02_1", "0100101395-02_…
$ psu <dbl> 113, 113, 113, 113, 113, 130, 130, 106, 106, 106, 131…
$ strata <dbl> 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121…
$ weight <dbl> 0.193444, 0.193444, 0.193444, 0.193444, 0.193444, 0.2…
$ child_hb <dbl> 8.3, 7.8, 9.2, 7.2, 7.2, 12.6, 10.2, 6.6, 12.9, 7.1, …
$ solid_fuel <dbl> 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,…
$ no_sep_kitchen <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
$ child_age_months <dbl> 51, 12, 25, 13, 39, 57, 11, 36, 6, 12, 52, 31, 42, 32…
$ child_male <dbl> 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0,…
$ mother_hb <dbl> 13.8, 7.9, 8.4, 10.2, 10.2, 8.6, 10.9, 11.1, 7.7, 11.…
$ mother_edu <chr> "Secondary", "Primary", "Secondary", "Secondary", "Se…
$ wealth <chr> "Middle", "Poorest", "Poorest", "Middle", "Poorer", "…
$ rural <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
$ region <chr> "North", "North", "North", "North", "North", "North",…
$ state <chr> "Jammu & Kashmir", "Jammu & Kashmir", "Jammu & Kashmi…