Learn R Programming

SUMMER (version 0.2.1)

getBirths: Function to get Births file from DHS .dta files.

Description

Function to get Births file from DHS .dta files.

Usage

getBirths(filepath, surveyyear, variables = c("caseid", "v001", "v002",
  "v004", "v005", "v021", "v022", "v023", "v024", "v025", "v139", "bidx"),
  strata = c("v024", "v025"))

Arguments

filepath

file path of raw .dta file from DHS

surveyyear

year of survey

variables

vector of variables to be used in obtaining the person-month files. The variables correspond the the DHS recode manual VI. For early DHS data, the variable names may need to be changed.

strata

vector of variable names used for strata. If a single variable is specified, then that variable will be used as strata indicator If multiple variables are specified, the interaction of these variables will be used as strata indicator.

Value

A list of birth-month data

Examples

Run this code
# NOT RUN {
my_fp <- "/myExampleFilepath/surveyData.DTA"
DemoData <- getBirths(filepath = my_fp, surveyyear = 2015) 
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab