Skip to contents

Bootstrap replicate weights (Rao-Wu rescaling within strata).

Usage

morie_weights_bootstrap(weights, n_replicates = 200, strata = NULL, seed = 42)

Arguments

weights

Numeric vector of unit-level design weights.

n_replicates

Integer; replicate count.

strata

Optional vector of stratum identifiers aligned with weights.

seed

Integer RNG seed.

Value

A numeric matrix.

Examples

set.seed(1)
res <- morie_weights_bootstrap(runif(20, 0.5, 2), n_replicates = 20)
str(res, max.level = 1)
#>  num [1:20, 1:20] 0.898 0 1.359 5.587 2.408 ...