
Calculate IPTp Coverage from DHS Data (standardized long-format output)
Source:R/indicator_iptp.R
calc_iptp_dhs.RdComputes IPTp 1+/2+/3+/4+ and exact-dose 1/2/3 coverage indicators
nationally and optionally by subnational region, returning the standardized
list(adm0, adm1) output.
Usage
calc_iptp_dhs(
dhs_ir,
survey_vars = list(cluster = "v001", weight = "v005", stratum = "v022", adm1 = "v024",
adm2 = NULL, interview_cmc = "v008", birth_cmc = "b3_01", birth_age_months =
"b19_01", sp_taken = "m49a_1", sp_doses = "ml1_1"),
birth_window_months = 24,
region_var = NULL,
gps_data = NULL,
gps_vars = list(cluster = "DHSCLUST", lat = "LATNUM", lon = "LONGNUM"),
shapefile = NULL,
admin_level = NULL,
join_nearest = TRUE,
ci_method = "logit"
)Arguments
- dhs_ir
DHS Individual Recode dataset (IR) in tidy format.
- survey_vars
Named list mapping DHS variable names.
- birth_window_months
Maximum age of most recent birth in months. Default 24 (DHS standard).
- region_var
Optional column name (character string) in
dhs_irto use as the subnational grouping variable (e.g.,"v024"for region).- gps_data
Optional DHS GE (GPS) cluster dataset used to attach admin-unit labels when
shapefileis supplied. DefaultNULL.- gps_vars
Named list mapping cluster/lat/lon column names in
gps_data. Defaults to the standard DHS GE names (DHSCLUST,LATNUM,LONGNUM).- shapefile
Optional
sfpolygon dataset whose attributes carry admin labels for the cluster-to-admin spatial join. WhenNULL(default) the spatial join step is skipped.- admin_level
Character vector of admin column names in
shapefileto retain (e.g.c("adm1", "adm2")). DefaultNULL(use all).- join_nearest
Logical. If
TRUE(default), clusters that fall outside any polygon are re-assigned to the nearest polygon. IfFALSE, unmatched clusters are left asNA.- ci_method
CI method for svyciprop. Default: "logit".