Skip to content

weightflow

1.1.0

Declarative Recipes for Staged Survey Weighting with Recipe-Aware Replicate Variances

0packages depend
954downloads / year
93.3%test coverage
13/13checks pass

Overview

About
Maintained by Juan Pablo FerreiraFirst published 2026-06-304 releasesCRAN page ↗GitHub ↗

Builds survey analysis weights by declaring the whole weighting process as an ordered recipe of explicit adjustments and estimating it in a single call. The recipe follows the stages of a real household survey: redistribution of unresolved eligibility, within-household selection, nonresponse adjustment by weighting classes, by response-propensity models (logistic regression or machine-learning learners such as trees, random forests and gradient boosting, with optional cross-fitting) or by two-phase calibration for nonresponse, calibration to known population totals following Deville and Sarndal (1992) doi:10.2307/2290268, optional model-assisted (model) calibration to auxiliary predictions following Wu and Sitter (2001) doi:10.1198/016214501750333054, and range-restricted trimming that bounds the weights while preserving the calibration totals. Variances come from a recipe-aware bootstrap and jackknife that resample or delete primary sampling units and re-apply the entire cascade on each replicate, following the rescaling bootstrap of Rao and Wu (1988) doi:10.1080/01621459.1988.10478591, so the replicate weights carry the variability of every adjustment instead of treating the adjustments as known. A self-contained HTML report documents each step with its diagnostics, and the weights bridge to the 'survey' and 'srvyr' packages for design-based inference.

Install

Health

CRAN checks
13OK
Slowest check: 4.3 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 1.07
93.3%
Coverage · measured lines
100%
Documentation · exports
4
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-07-01
    7 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 2,470 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
96%
Return-value docs
100%
References docs
3%

Downloads

954
CRAN downloads in the past year
Rank #10,042 · ~3/day · ~80/mo
Daily download trend is not available in this view yet.
31930 days
95490 days
9541 year
Compare downloads with other packages →
Also on17 r2u6 autocran

Repository

Repository
7Stars
1Forks
0Open issues
0Open PRs
0Releases
160Commits
1Contributors
160 commits · Last activity 2026-08-25 · +250% stars, 30d

Stars over time

2026-06-18 · 12026-08-20 · 7

Repository practices

Upstream repositoryBeta

4 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/jpferreira33/weightflow on 2026-08-23.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.1.0
Imports (4)
statsutilsgraphicsparallel
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Datasets

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Author · added in 1.0.0
Package Timeline

4 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 1.1.0Latest
    2026-08-19 · current release · diff ↗
  • 1.0.0
    2026-08-04 · diff ↗
  • 0.2.0
    2026-07-22 · diff ↗
  • 0.1.0
    2026-06-30
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-06-30
Total releases
4 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
32 KB / 3 files
Download size
1.1 MB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("weightflow")
Ferreira, J. P., & Gutiérrez, A. (2026). weightflow: Declarative Recipes for Staged Survey Weighting with Recipe-Aware Replicate Variances (Version 1.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.weightflow

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for weightflow version 1.1.0 [Data set]. HJJB, LLC. Data release v2026-08-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy