Skip to contents

Computes 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 from ipm_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. If FALSE, component missing values are allowed to propagate to ipm_score, tpm, and tpem.

Value

A data frame with IPM score and flags plus an ipm_flags_diagnostics attribute.

Details

This function computes ipm_score, tpm, and tpem only. It does not compute aggregate A or aggregate IPM; those require survey-design-aware aggregation among multidimensionally poor people and belong to a future KPI layer. This function does not claim official validation.