Estimate a survey total using ENEMDU complex survey design
Source:R/survey_estimators.R
enemdu_survey_total.RdEstimates a weighted total using ENEMDU design variables and returns a stable
analytical output with precision metrics. The function uses
survey::svytotal() internally.
Usage
enemdu_survey_total(
data,
value,
group_vars = NULL,
ids = "upm",
strata = "estrato",
weight = "fexp",
survey_type = NULL,
indicator_id = NULL,
measure = NULL,
na_rm = TRUE,
conf_level = 0.95,
lonely_psu = "adjust",
sample_n_min = 60
)Arguments
- data
A data frame.
- value
Numeric variable to total.
- group_vars
Optional grouping variables.
- ids
Primary sampling unit variable. Defaults to
"upm".- strata
Strata variable. Defaults to
"estrato".- weight
Expansion factor variable. Defaults to
"fexp".- survey_type
Optional ENEMDU survey type.
- indicator_id
Optional stable indicator identifier.
- measure
Optional human-readable measure name.
- na_rm
Logical. If
TRUE, missing values invalueare excluded.- conf_level
Confidence level for confidence intervals.
- lonely_psu
Option passed to
survey.lonely.psu.- sample_n_min
Minimum unweighted sample size for preliminary quality flag.