Skip to contents

The same method as \(link{Poststs}\) seen from the weight side: with unit design weights the two return the same number. The adjusted weights sum to \(_h\) within every stratum exactly, which is the calibration property that makes the adjustment worth doing.

Usage

Postrt(y, weights, stratum, N_h)

Arguments

y

Observed values.

weights

Design weights, positive.

stratum

Stratum label per observation.

N_h

Population size per stratum.

Value

List with estimate, weights, factors, N, n, strata.

Details

Formula: \(w_i' = w_i N_h / sum_{j in h} w_j\); the estimate is the weighted mean

References

Holt, D. & Smith, T. M. F. (1979). Post stratification. Journal of the Royal Statistical Society Series A 142(1):33-46. doi:10.2307/2344652 . Standard form, as for Poststs.

Examples

Postrt(y = c(1, 2, 3, 4, 5, 6, 7, 8), weights = c(1, 2, 3, 4, 5, 6, 7, 8),
  stratum = c(1, 2, 3, 4, 5, 6, 7, 8), N_h = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 5.666667
#> 
#> $weights
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $factors
#> [1] 1 1 1 1 1 1 1 1
#> 
#> $N
#> [1] 36
#> 
#> $n
#> [1] 8
#> 
#> $strata
#> [1] 8
#> 
#> $method
#> [1] "Post-stratification weight adjustment w_i N_h / sum_h w"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"