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

Overview

The childhoodmortality package offers a straightforward approach to computing childhood mortality rates. The package was developed in accordance with the “Methodology of DHS Mortality Rates Estimation” section of the DHS Guide to Statistics (Rutstein 2006:90-95). Specifically, the package uses a synthetic cohort life table approach, combining mortality probabilities for age segments with actual cohort mortality experience. The childhoodmortality package defaults to the DHS Program’s practice of calculating mortality rates for five-year periods preceding the start date of the survey. By adhering to DHS Guidelines, estimates produced from the package can be compared to those published in the DHS Final Reports.

DHS surveys are conducted using a multi-stage stratified design, so standard sampling error formulae for simple random samples cannot be applied. For mortality rates, the DHS Program uses a jackknife repeated replication approach outlined in Appendix C of the DHS Final Reports (Rutstein 2006). This resampling technique systematically omits a single cluster from the dataset, replicates the mortality rate estimate, repeats this replication for every cluster, and then uses the mortality rates computed in the replications to calculate standard errors. This approach controls for sample design. The childhoodmortality package computes standard errors for the mortality rate type specified. The formula for the jackknife repeated replication method is as follows:

$$SE^2(r) = var(r) = \frac{1}{k(k-1)} \sum\limits_{j=1}^k (r_i-r)^2 $$

in which:

$$r_i =kr-(k-1)r_{(i)}$$ and:

$r$ is the mortality rate estimate

$r_{(i)}$ is the estimate computed from the samples omitting the $i^{th}$

$k$ is the total number of clusters

Using the childhoodmortality package

The three required arguments for the primary function \texttt{childhoodmortality()} are:

Input Data

The childhoodmortality package computes mortality rates from IPUMS-DHS data or da birth recode file from the DHS program.

IPUMS-DHS

If data is obtained from IPUMS-DHS, the unit of analysis must be "Births." The following variables need to be included in the extract: KIDDOBCMC, KIDAGEDIEDIMP, INTDATECMC, PSU, PERWEIGHT

The easiest way to import IPUMS-DHS data into R is the ipumsr package.

Download a .csv or .dat extract from IPUMS-DHS, and on the extract page right click and use the "save link as" option to save the DDI to the same directory as the data file.

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

Head of example input data:

| YEAR| WEALTHQ| PSU| PERWEIGHT| KIDDOBCMC| INTDATECMC| KIDAGEDIEDIMP| |----:|-------:|---:|---------:|---------:|----------:|-------------:| | 2015| 1| 53| 2.097505| 1323| 1387| NA| | 2015| 1| 36| 0.743239| 1381| 1387| 0| | 2015| 2| 190| 1.063310| 1371| 1389| NA| | 2015| 2| 21| 1.729982| 1375| 1387| NA| | 2015| 1| 82| 0.875351| 1385| 1386| NA| | 2015| 2| 159| 0.940895| 1337| 1388| NA|

DHS

The package can be used with a DHS BR recode Stata file.

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

Installing the childhoodmortality package

The childhoodmortality package in on the Comprehensive R Archive Network (CRAN). This makes installation straightforward:

The package only needs to be installed once, but it must be reloaded every time a new session is started.

install.packages("childhoodmortality")
library(childhoodmortality)

Alternatively, install through github:

install.packages("devtools")
devtools::install_github("caseybreen/childhoodmortality")

Childhoodmortality function

The call to the childhoodmortality function is as follows:

underfive_mortality_rates <- childhoodmortality(
 data = model_ipums_dhs_dataset,
 grouping ="WEALTHQ",
 rate_type = "underfive"
)

| WEALTHQ| underfive| SE| Lower_confidence_interval| Upper_confidence_interval| |-------:|---------:|--------:|-------------------------:|-------------------------:| | 1| 102.5227| 21.17584| 60.17105| 144.8744| | 2| 133.4626| 32.65866| 68.14528| 198.7799|

The childhoodmortality function returns a data frame containing::



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