
Use a weighted survey as the calibration reference instead of a frame
Source:R/spec-steps-final.R
reference_sample.RdWraps a reference-survey microdata data.frame together with its design
weights so it can be passed as the population argument of
step_model_calibration() (and any step that takes a population frame).
The calibration totals are then the weighted sums over the reference survey
– an estimate of the population totals – instead of unweighted sums over a
full frame. This is the model-assisted / two-survey setup: fit the model on
your sample, project it onto a larger reference survey, and calibrate to the
weighted totals of the projection (Wu and Sitter 2001; Kim and Rao 2012).
Arguments
- data
a
data.frameof reference-survey microdata, with the columns used inx_formulaand the model predictors.- weights
either the name (string) of a positive weight column in
data, or a numeric vector with one weight per row.- replicates
optional numeric matrix (or data.frame) of replicate weights for the reference survey – one row per reference unit, one column per replicate – used to propagate the reference sampling variance through
bootstrap_weights().NULL(default) treats the totals as fixed. Note that onlybootstrap_weights()pairs the reference replicates and propagates this variance;jackknife_weights()treats the estimated totals as fixed even whenreplicatesis supplied, so use the bootstrap when this component matters.
Value
data tagged so that step_model_calibration() weights its totals by
weights. It is still an ordinary data.frame.
Details
A reference survey with all weights equal to 1 reproduces the plain-frame
behaviour exactly. To propagate the reference survey's own sampling variance
into the recipe-aware bootstrap, pass its replicate weights through
replicates: each bootstrap replicate then re-estimates the totals from the
paired reference replicate (Opsomer and Erciulescu 2021), so the extra
variance from estimating the totals is captured. Without replicates the
totals are treated as fixed (a reasonable approximation when the reference is
much larger than the sample, and the same assumption made when calibrating to
another survey's published totals).