Package: weightflow
Title: Declarative Recipes for Staged Survey Weighting with
        Recipe-Aware Replicate Variances
Version: 1.3.0
Authors@R: c(
    person("Juan Pablo", "Ferreira", email = "juanpablo.ferreira@fcea.edu.uy",
           role = c("aut", "cre", "cph"),
           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. Steps cover within-cluster selection, subsampling for
    two-phase designs, nonresponse by weighting classes or
    response-propensity models (optionally machine-learning, with
    cross-fitting), calibration to known totals following Deville and
    Sarndal (1992) <doi:10.2307/2290268>, optionally model-assisted,
    non-probability samples by pseudo-weighting, mass imputation and
    doubly robust estimators, and range-restricted trimming. Rotating and
    pure panels add panel-selection probabilities, attrition, longitudinal
    weights, gross flows and composite estimation. 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 Rao and Wu (1988) <doi:10.1080/01621459.1988.10478591>;
    panel replicates are coordinated across waves, so the sample overlap
    enters the variance of a net change as covariance, and two-phase
    variances split into first- and second-phase components (V = V1 + V2).
    A self-contained HTML report documents each step, and the weights
    bridge to the 'survey' and 'srvyr' packages. The methods, and the
    simulation evidence behind the variance estimators, are described in
    Ferreira (2026) <doi:10.1177/18747655261484262>.
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
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-09-11 17:41:02 UTC; jp
Author: Juan Pablo Ferreira [aut, cre, cph] (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-09-11 20:10:02 UTC
