Skip to contents

phi_hat_c = sum(weights of respondents in class c) / sum(weights of the selected sample in class c); respondent weights are multiplied by 1/phi_hat_c, so adjusted class totals equal the original full-sample class totals exactly.

Usage

morie_respwt(weights, responded, classes)

Arguments

weights

Positive sampling weights of the selected sample.

responded

Logical response indicator.

classes

Weighting-class label per unit.

Value

A list with elements adjusted (NA for nonrespondents), phi_hat, factors, balance_error, n, method.

References

Lohr, S. L. (2010). Sampling: Design and Analysis, 2nd ed. Brooks/Cole, Sec. 8.5.1.

Examples

w <- c(10, 10, 20, 20, 15, 15)
r <- c(TRUE, FALSE, TRUE, TRUE, FALSE, TRUE)
cls <- c("a", "a", "b", "b", "c", "c")
morie_respwt(w, r, cls)$adjusted
#> [1] 20 NA 20 20 NA 30