Skip to contents

Within each stratum draw m_h of the n_h clusters with replacement and rescale the survey weights by Eq. 3.4: w* = [(1 - r) + r (n_h/m_h) m*] w with r = sqrt(m_h/(n_h - 1)); the bootstrap variance is (1/B) sum_b (theta*_b - theta_hat)^2 (Eq. 3.5). m_h = n_h - 1 (default) keeps all weights non-negative; for n_h = 2 a selected cluster doubles and the other zeroes, as printed in the paper.

Usage

morie_bootss(
  y,
  weights,
  strata,
  clusters,
  statistic = NULL,
  B = 200,
  m = NULL,
  seed = 0
)

Arguments

y

Numeric observations (ultimate units).

weights

Positive survey weights.

strata

Stratum label per observation.

clusters

Cluster (PSU) label per observation.

statistic

Function(y, w) -> scalar; default the weighted total sum(w * y).

B

Number of bootstrap replicates.

m

Clusters drawn per stratum (scalar or named list); default n_h - 1.

seed

SplitMix64 seed (mirrors the Python arm).

Value

A list with elements estimate, variance, se, replicates, B, n_strata, seed, method.

References

Rao, J. N. K., Wu, C. F. J. and Yue, K. (1992). Some recent work on resampling methods for complex surveys. Survey Methodology, 18(2), 209-217. Rao, J. N. K. and Wu, C. F. J. (1988). Resampling inference with complex survey data. JASA, 83, 231-241.

Examples

set.seed(1)
strata <- rep(1:2, each = 12)
clusters <- rep(1:8, each = 3)
y <- rnorm(24, 10)
w <- rep(c(5, 8), each = 12)
b <- morie_bootss(y, w, strata, clusters, B = 100, seed = 1)
c(b$estimate, b$se)
#> [1] 1579.10348   33.95162