Skip to contents

Post-stratification uses stratum sizes that were not used to draw the sample. When the sample happens to be proportionally allocated the estimator collapses to the plain sample mean, which is the anchor used for this module.

Usage

Poststs(y, stratum, Nh)

Arguments

y

Observed values.

stratum

Stratum label per observation.

Nh

Population size per stratum; an unnamed vector is matched to the strata in order of first appearance.

Value

List with estimate, se, variance, strata, N, n.

Details

Formula: ybar_post = sum_h (N_h / N) ybar_h with var = sum_h (N_h / N)^2 s_h^2 / n_h.

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; the paper is paywalled and not held locally.

Examples

Poststs(y = c(1, 2, 3, 4, 5, 6, 7, 8), stratum = c(1, 2, 3, 4, 5, 6, 7, 8),
  Nh = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 5.666667
#> 
#> $se
#> [1] 0
#> 
#> $variance
#> [1] 0
#> 
#> $strata
#> [1] 8
#> 
#> $N
#> [1] 36
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Post-stratified mean, sum_h (N_h/N) ybar_h"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"