Skip to contents

Units are partitioned into classes on observed variables; within a class the responding units carry the adjustment factor (sum of base weights in the class) / (sum of base weights of respondents in the class), the inverse of the estimated response probability under the assumption that response is independent of the item value within a class. The adjusted estimate equals the class-size-weighted average of the class respondent means.

Usage

Itnnrs(y, R, X, weights = NULL)

Arguments

y

Item values; entries with R = 0 are unused.

R

Response indicator, 0 or 1.

X

Class-defining variables, one row per unit; rows with equal values form a class. NULL puts everyone in one class.

weights

Base design weights; NULL means all ones.

Value

List with estimate, se, n_classes, response_rate, min_class_rate, max_class_rate, adjusted_total, n_respondents, n, method.

Details

Formula: f_c = W_c / W_c(respondents).

References

Kalton and Flores-Cervantes (2003), Weighting methods, Journal of Official Statistics 19(2):81-97.

Examples

set.seed(1)
X <- matrix(rep(1:2, each = 10), 20, 1)
R <- rep(1, 20)
R[c(3, 7, 15)] <- 0
Itnnrs(y = rnorm(20), R = R, X = X)
#> $estimate
#> [1] 0.1801403
#> 
#> $se
#> [1] 0.2151193
#> 
#> $n_classes
#> [1] 2
#> 
#> $response_rate
#> [1] 0.85
#> 
#> $min_class_rate
#> [1] 0.8
#> 
#> $max_class_rate
#> [1] 0.9
#> 
#> $adjusted_total
#> [1] 20
#> 
#> $n_respondents
#> [1] 17
#> 
#> $n
#> [1] 20
#> 
#> $method
#> [1] "weighting-class adjustment f_c = W_c / W_c(resp), Kalton & Flores-Cervantes (2003)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"