Package: weightflow
Title: Declarative API for Staged Survey Weights
Version: 1.0.0
Authors@R: c(
    person("Juan Pablo", "Ferreira", email = "juanpablo.ferreira@fcea.edu.uy",
           role = c("aut", "cre")),
    person("Andrés", "Gutiérrez", role = "ctb",
           comment = c(ORCID = "0009-0007-2918-1932",
                       affiliation = "ECLAC - Statistics Division")))
Description: Builds survey weights from design base weights by chaining the
    stages of a weighting workflow (unknown-eligibility redistribution,
    nonresponse adjustment, calibration to known population totals, and weight
    trimming) through a declarative, pipeable, 'tidymodels'-style API, with
    nonresponse handled by weighting classes, by response-propensity
    models fitted with logistic regression or machine-learning learners (trees,
    random forests and gradient boosting), or by calibration. Calibration
    follows Deville and Sarndal (1992) <doi:10.2307/2290268>, and a
    range-restricted variant trims the weights into a fixed interval while
    preserving the calibration totals, following the generalized exponential
    method of Folsom and Singh (2000). Variances are obtained with a
    recipe-aware bootstrap and jackknife that resample primary sampling units
    and re-apply the whole 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. A
    self-contained HTML report documents each step with 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-04 14:59:29 UTC; jp
Author: Juan Pablo Ferreira [aut, cre],
  Andrés Gutiérrez [ctb] (ORCID: <https://orcid.org/0009-0007-2918-1932>,
    affiliation: ECLAC - Statistics Division)
Maintainer: Juan Pablo Ferreira <juanpablo.ferreira@fcea.edu.uy>
Repository: CRAN
Date/Publication: 2026-08-04 17:10:02 UTC
