Build IPM score and flags from registered components
Source:R/ipm_flags.R
enemdu_build_ipm_flags.RdComputes row-level IPM weighted deprivation scores and poverty flags from the
12 already-built binary IPM component indicators declared in
ipm_component_registry.csv. This function does not derive the 12 indicators
from raw ENEMDU questionnaire variables.
Usage
enemdu_build_ipm_flags(
data,
component_cols = NULL,
score_var = "ipm_score",
tpm_var = "tpm",
tpem_var = "tpem",
overwrite = FALSE,
strict = TRUE
)Arguments
- data
A data frame.
- component_cols
Optional character vector with the 12 binary IPM component columns. If
NULL, the expected component names are read fromipm_component_registry.csv.- score_var
Output weighted deprivation score variable.
- tpm_var
Output multidimensional poverty flag variable.
- tpem_var
Output extreme multidimensional poverty flag variable.
- overwrite
Logical. If
TRUE, overwrite existing output variables.- strict
Logical. If
TRUE, abort on missing component columns, invalid binary values, or missing component values. IfFALSE, component missing values are allowed to propagate toipm_score,tpm, andtpem.