Society & Economicsarticle2026-09-09

Weightflow: Reproducible, recipe-aware survey weighting for official statistics in R

0 citations

Abstract

Weighting is a governed, reproducible subprocess in the production of official statistics: design weights are refined through a cascade of adjustments (unknown eligibility, out-of-scope units, within-household selection, nonresponse, and calibration to known totals), after which defensible variances must account for the fact that several adjustments were themselves estimated. In practice this cascade is scattered across scripts and proprietary systems, hard to audit, reproduce and hand over. We present weightflow, a dependency-free (base R) package that builds survey weights as one declarative, pipeable recipe, so that the object which computes the weights doubles as an audit trail of every methodological decision. A rescaling bootstrap and a delete-a-PSU jackknife re-apply the whole recipe on each replicate, so the replicate weights reflect every estimated stage and not the final calibration alone, and export to survey/srvyr. A Monte Carlo study on synthetic populations with known finite-population estimands measures what the conventional shortcut costs, and the answer has no fixed sign. When the cells of the nonresponse adjustment are contained in the crossed calibration margins, the calibration reconstructs that adjustment exactly and freezing it is exactly free. When the nonresponse model uses information the margins do not span, which is the case whenever paradata or propensity models earn their keep, the frozen variance overstates the truth by 9 to 52 per cent; where the point estimator is approximately centred this leaves the conventional interval conservative and needlessly wide, and where it is not, no variance treatment recovers nominal coverage. Which regime a survey is in cannot be read off a single realised sample, which is the practical case for re-running the recipe. The package implements raking, post-stratification and GREG calibration with bounds, ridge and domain variants, model-assisted (Wu–Sitter) calibration, three families of nonresponse adjustment, and representativity indicators. We position it within the GSBPM and the total survey error framework, validate it numerically against five reference implementations, and illustrate it on the Uruguayan continuous household survey ( Encuesta Continua de Hogares , ECH).

// Source

View paper (DOI)OpenAlexStatistical Journal of the IAOSPublished 2026-09-09

Authors: Juan Pablo Ferreira-Neira

Institutions: Universidad de la República de Uruguay