R/survey_design.R
setup_survey_design.RdCreates up to three survey design objects — one per WHO STEPS Step —
each using the appropriate step-specific weight column
(wt_step1, wt_step2, wt_step3).
setup_survey_design(data)A data frame (typically from clean_steps_data()).
A list of class "steps_designs" with three
survey::svydesign objects (step1, step2, step3).
The returned object is a list of class "steps_designs" with elements
$step1, $step2, $step3. For backward compatibility it can also
be used directly as a single design (it delegates to $step1).
The function handles five design cases per step:
Full complex design: weights + strata + clusters
Weights + clusters, no strata
Weights + strata, no clusters
Weights only
Unweighted (simple random sampling)
Weights are used as-is without trimming, consistent with the WHO official STEPS analysis scripts.