Package: weightflow Title: Weighting Probability and Non-Probability Survey Samples with Recipe-Aware Replicate Variances Version: 1.3.1 Authors@R: c( person("Juan Pablo", "Ferreira", email = "juanpablo.ferreira@fcea.edu.uy", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-1884-8187")), person("Andrés", "Gutiérrez", role = "aut", comment = c(ORCID = "0009-0007-2918-1932"))) Description: Builds survey analysis weights by declaring the whole weighting process as an ordered recipe of explicit adjustments, estimated in a single call: unknown eligibility, within-cluster selection, two-phase subsampling, nonresponse by weighting classes or response-propensity models, calibration and trimming. Calibration to known totals runs on linear, raking or logit distances, bounded, ridge-penalized, model-assisted or integrative with one weight per cluster; a calibrated trim bounds the weights while keeping the control totals exact. Non-probability samples are weighted against a probability reference sample by pseudo-weighting, mass imputation and doubly robust estimators that calibrate a single weight on the fitted values of several working models and on the population totals of the auxiliaries at once, so one multipurpose weight serves many variables. Variances come from a recipe-aware bootstrap and jackknife that re-apply the entire cascade on each replicate, so every adjustment is inside the variance instead of being treated as fixed; across panel waves the replicates are coordinated by carrying forward the selection multiplicities of the sampling units, so the sample overlap enters the variance of a net change as covariance. Rotating and pure panels add attrition, longitudinal weights, gross flows and composite estimation, a self-contained HTML report documents each step, and the weights bridge to the 'survey' and 'srvyr' packages, which are optional: the package itself runs on base R. The methods, and the simulation evidence behind the variance estimators, are described in Ferreira (2026) . License: MIT + file LICENSE Encoding: UTF-8 Language: en-US Depends: R (>= 4.1.0) Imports: stats, utils, graphics, parallel Suggests: MASS, rpart, ranger, testthat (>= 3.0.0), survey, srvyr, dplyr, tidyr, ggplot2, haven, archive, knitr, rmarkdown, spelling, xgboost, yaml Roxygen: list(markdown = TRUE, roclets = c("rd")) Config/roxygen2/version: 8.0.0 URL: https://github.com/jpferreira33/weightflow, https://jpferreira33.github.io/weightflow/ BugReports: https://github.com/jpferreira33/weightflow/issues Config/testthat/edition: 3 LazyData: true VignetteBuilder: knitr Repository: https://jpferreira33.r-universe.dev Date/Publication: 2026-10-16 01:50:47 UTC RemoteUrl: https://github.com/jpferreira33/weightflow RemoteRef: HEAD RemoteSha: b895824695e80544d2a044f3c56cddb804827e1f NeedsCompilation: no Packaged: 2026-10-16 07:29:32 UTC; root Author: Juan Pablo Ferreira [aut, cre] (ORCID: ), Andrés Gutiérrez [aut] (ORCID: ) Maintainer: Juan Pablo Ferreira