Within each cell, scales respondent weights up by total/responder ratio.
Non-respondents end up with weight 0.
Usage
morie_weights_nonresponse(weights, responded, adjustment_cells = NULL)
Arguments
- weights
Numeric vector of unit-level design weights.
- responded
Logical/integer 0/1 vector of response indicators.
- adjustment_cells
Optional cell identifiers used by
nonresponse adjustment.
Value
A numeric value (scalar).
Examples
set.seed(1)
res <- morie_weights_nonresponse(rep(1, 30), rbinom(30, 1, 0.7) == 1,
adjustment_cells = rep(c("a", "b"), 15))
str(res, max.level = 1)
#> num [1:30] 1.5 1.36 1.5 0 1.5 ...