Skip to contents

Fay's BRR weights with perturbation coefficient fay_coefficient in [0,1).

Usage

morie_weights_fay_brr(
  weights,
  strata,
  fay_coefficient = 0.5,
  n_replicates = NULL,
  seed = 42
)

Arguments

weights

Numeric vector of unit-level design weights.

strata

Optional vector of stratum identifiers aligned with weights.

fay_coefficient

Fay's coefficient (\(k\)) for Fay's-BRR.

n_replicates

Integer; replicate count.

seed

Integer RNG seed.

Value

A numeric matrix.

Examples

set.seed(1)
res <- morie_weights_fay_brr(runif(16, 0.5, 2), rep(1:8, each = 2))
str(res, max.level = 1)
#>  num [1:16, 1:8] 0.449 1.587 0.68 2.793 0.401 ...