Skip to contents

Built natively in base R. JK1: replicate \(i\) drops unit \(i\) and scales the others by \(n/(n-1)\). JKn (needs strata): one replicate per unit, dropping it and scaling the rest of its stratum by \(n_h/(n_h-1)\) (Wolter 2007, ch. 4) – the replicate weights of survey::as.svrepdesign(..., type = "JK1"/"JKn"); no package is called.

Usage

morie_weights_jackknife(weights, strata = NULL, jk_type = c("JK1", "JKn"))

Arguments

weights

Numeric vector of unit-level design weights.

strata

Optional vector of stratum identifiers aligned with weights.

jk_type

Character; jackknife type ("jk1", "jk2", "jkn").

Value

A numeric matrix.

Examples

set.seed(1)
res <- morie_weights_jackknife(runif(10, 0.5, 2))
str(res, max.level = 1)
#>  num [1:10, 1:10] 0 1.176 1.51 2.069 0.892 ...