knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Replicating DHS Childhood Mortality Estimates

This vignette will provide step-by-step instructions to replicate the estimates provided by the DHS Final Reports. In this Vignette, we'll replicate the estimates reported in the Nigeria 2013 Final Report.

Importing Data

Data can be obtained from IPUMS-DHS or directly from the DHS Program.

Import data from IPUMS-DHS

If data is obtained from IPUMS-DHS:

library(ipumsr)
ng2013 <- read_ipums_micro(data_file = "idhs_00019.csv", ddi = "idhs_00019.xml")

Import data from DHS Program

If data is obtained from the DHS Program:

library(haven)
ng2013 <- read_dta("NGBR6AFL.DTA")

Replicating Tables

This table displays estimates of neonatal, post-neonatal, infant, child, under-five mortality rates and standard erros.

To replicate these tables, we'll just have to call the childhoodmortality function. The package defaults to computing mortality rates and standard errors for all rate types:

library(childhoodmortality)
childhoodmortality(ng2013)

|sample |rate_type | mortality_rate| SE| lower_confidence_interval| upper_confidence_interval| |:-------------------|:------------|--------------:|--------:|-------------------------:|-------------------------:| |[5665] Nigeria 2013 |neonatal | 37.28012| 1.483270| 34.31358| 40.24666| |[5665] Nigeria 2013 |postneonatal | 32.48209| 1.472823| 29.53644| 35.42774| |[5665] Nigeria 2013 |infant | 68.55127| 2.133319| 64.28463| 72.81791| |[5665] Nigeria 2013 |child | 63.88013| 2.676241| 58.52765| 69.23261| |[5665] Nigeria 2013 |underfive | 128.05234| 3.688539| 120.67526| 135.42942|

The next table displays mortality rates for several subpopulations.

To calculate subnational estimates, we need a variable to "disaggregate" over - a categorical variable in data which the mortality rates will be disaggregated (e.g. IPUMS-DHS integrated geography variables, wealth quintile, education variables, etc.)

Two important notes:

library(childhoodmortality)
rates_by_residence <- childhoodmortality(ng2013, grouping = "urban", period = 10)

rates_by_residence %>% 
  select(urban
         , rate_type, mortality_rate) %>%
  spread(rate_type, mortality_rate) %>%
  mutate(postneonatal = infant - neonatal) %>%
  mutate_if(is.numeric, funs(round(., 0)))

|urban | child| infant| neonatal| postneonatal| underfive| |:---------|-----:|------:|--------:|------------:|---------:| |[1] Urban | 42| 60| 34| 26| 100| |[2] Rural | 89| 86| 44| 42| 167|

library(childhoodmortality)
rates_by_region <- childhoodmortality(ng2013, grouping = "geo_ng2013", period = 10)

rates_by_region %>% 
  select(geo_ng2013, rate_type, mortality_rate) %>%
  spread(rate_type, mortality_rate) %>%
  mutate(postneonatal = infant - neonatal) %>%
  mutate_if(is.numeric, funs(round(., 0)))

|geo_ng2013 | child| infant| neonatal| postneonatal| underfive| |:-----------------|-----:|------:|--------:|------------:|---------:| |[1] North Central | 36| 66| 35| 31| 100| |[2] North East | 90| 77| 43| 33| 160| |[3] North West | 105| 89| 44| 46| 185| |[4] South East | 54| 82| 37| 45| 131| |[5] South South | 35| 58| 32| 26| 91| |[6] South West | 31| 61| 39| 21| 90|

library(childhoodmortality)
rates_by_education <- childhoodmortality(ng2013, grouping = "educlvl", period = 10)

rates_by_education %>% 
  select(educlvl, rate_type, mortality_rate) %>%
  spread(rate_type, mortality_rate) %>%
  mutate(postneonatal = infant - neonatal) %>%
  mutate_if(is.numeric, funs(round(., 0)))

|educlvl | child| infant| neonatal| postneonatal| underfive| |:----------------|-----:|------:|--------:|------------:|---------:| |[0] No education | 100| 89| 44| 47| 180| |[1] Primary | 57| 74| 42| 34| 128| |[2] Secondary | 35| 58| 34| 25| 91| |[3] Higher | 13| 50| 30| 21| 62|

library(childhoodmortality)
rates_by_wealth <- childhoodmortality(ng2013, grouping = "educlvl", period = 10)

rates_by_wealth %>% 
  select(wealthq, rate_type, mortality_rate) %>%
  spread(rate_type, mortality_rate) %>%
  mutate(postneonatal = infant - neonatal) %>%
  mutate_if(is.numeric, funs(round(., 0)))

|wealthq | child| infant| neonatal| postneonatal| underfive| |:-----------|-----:|------:|--------:|------------:|---------:| |[1] Poorest | 108| 92| 45| 47| 190| |[2] Poorer | 103| 94| 45| 49| 187| |[3] Middle | 61| 71| 39| 31| 127| |[4] Richer | 38| 65| 37| 28| 100| |[5] Richest | 26| 48| 30| 18| 73|



caseybreen/childhoodmortality documentation built on June 8, 2020, 7:03 p.m.