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

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).

Authors

Institutions

Publication Details

Journal
Statistical Journal of the IAOS
Published
2026-09-09
DOI
https://doi.org/10.1177/18747655261484262
Primary Topic
Survey Methodology and Nonresponse
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Juan Pablo Ferreira-Neira
Statistical Journal of the IAOS
Survey Methodology and Nonresponse
article

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

Juan Pablo Ferreira-Neira
article en

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).

Statistical Journal of the IAOS
Universidad de la República de Uruguay (UY)
Peace, Justice and strong institutions
Openalex Percentile: Top 5%
Survey Methodology and Nonresponse
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.