Builds the phase-3 core derived variables for ENEMDU analytical workflows:
Arguments
- data
A data frame.
- household_id
Household identifier. Defaults to
"idhogar"and falls back to"id_hogar"when needed.- normalize_missing
Logical. If
TRUE, appliesenemdu_normalize_missing_values()to registered income components before deriving income variables.- missing_applies_to
Missing-code registry scope. Defaults to
"income_derivation".- keep_raw_missing
Logical passed to
enemdu_normalize_missing_values().- create_missing_flags
Logical passed to
enemdu_normalize_missing_values().- missing_vars_absent
One of
"warn_as_na"or"error". If"warn_as_na", absent optional income variables are treated as all-missing during income construction.- existing
One of
"backup","overwrite"or"error"for existing output variables.- backup_suffix
Suffix used when
existing = "backup".
Details
household size (
hsize),main labor income (
ingr),secondary labor income (
ingrls),total labor income (
ingrl),individual total income before household aggregation (
ingrltot),household total income (
ingtot),household per-capita income (
ingtot_pc).
The function deliberately does not derive poverty or extreme poverty flags.
Poverty classification is handled by enemdu_build_poverty_flags() because it
requires explicit and auditable poverty-line parameters.