
Calculate Antimalarial Treatment from DHS Data
Source:R/indicator_antimalarial.R
calc_antimalarial_dhs_core.RdEstimates the proportion of febrile children under 5 who received any antimalarial drug using survey-weighted methods. This is step 3 of the case management cascade.
Usage
calc_antimalarial_dhs_core(
dhs_kr,
survey_vars = list(cluster = "v021", weight = "v005", stratum = "v022", age = "hw1",
fever = "h22", alive = "b5"),
region_var = NULL,
gps_data = NULL,
gps_vars = list(cluster = "DHSCLUST", lat = "LATNUM", lon = "LONGNUM"),
shapefile = NULL,
admin_level = NULL,
join_nearest = TRUE
)Arguments
- dhs_kr
DHS children's recode (KR) dataset (data.frame or tibble).
- survey_vars
Named list mapping DHS variable names. Required keys:
cluster: Cluster/PSU ID (default: "v021")weight: Survey weight (default: "v005")stratum: Stratum variable (default: "v022")age: Child's age in months (default: "hw1")fever: Had fever in last 2 weeks (default: "h22")
- region_var
Optional column name in
dhs_krto use as grouping variable (e.g., "v024" for region).- gps_data
Optional DHS GPS dataset with cluster coordinates.
- gps_vars
Named list for GPS variables (cluster, lat, lon).
- shapefile
Optional sf object with administrative boundaries.
- admin_level
Character vector of admin columns from shapefile (e.g., c("adm1", "adm2")).
- join_nearest
Logical; if TRUE, assigns clusters outside polygons to nearest admin unit. Default: TRUE.
Value
Tibble with antimalarial estimates by grouping level, including:
Grouping variables (region, admin level, or national)
dhs_antimalarial: Proportion receiving any antimalarialdhs_antimalarial_low,dhs_antimalarial_upp: 95\dhs_n_febrile: Number of febrile children (denominator)dhs_n_antimalarial: Number receiving any antimalarial
Details
Methodology: https://github.com/ahadi-analytics/sntmethods/blob/master/inst/methods/antimalarial_dhs.yml
Auto-detects the available drug series at runtime: ml13* variables (ml13a through ml13g, ml13aa, etc.) are preferred. If absent, falls back to the h37a-h series used in older DHS surveys (e.g. BFA 2021). received_antimalarial = 1 if ANY detected drug variable equals 1. ACT (ml13e / h37e) is a subset.
See also
calc_act_dhs() for ACT-specific treatment (step 4),
calc_case_management_dhs() for the full cascade