Package: weightflow
Title: Declarative Recipes for Staged Survey Weighting with
        Recipe-Aware Replicate Variances
Version: 1.1.0
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 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.
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
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
NeedsCompilation: no
Packaged: 2026-08-19 10:15:32 UTC; jp
Author: Juan Pablo Ferreira [aut, cre] (ORCID:
    <https://orcid.org/0000-0002-1884-8187>),
  Andrés Gutiérrez [aut] (ORCID: <https://orcid.org/0009-0007-2918-1932>)
Maintainer: Juan Pablo Ferreira <juanpablo.ferreira@fcea.edu.uy>
Repository: CRAN
Date/Publication: 2026-08-19 11:20:02 UTC
Built: R 4.6.1; ; 2026-08-22 23:11:17 UTC; windows
