
Jackknife estimate, standard error and confidence interval
Source:R/variance.R
jackknife_estimate.RdApplies a statistic to the point weights and to every delete-a-PSU replicate, and summarises it with the stratified jackknife (JKn) variance $$\sum_h \frac{n_h - 1}{n_h} \sum_{i \in h} (\theta_{(hi)} - \bar\theta_h)^2,$$ where \(\theta_{(hi)}\) is the estimate with PSU \(i\) of stratum \(h\) deleted and \(\bar\theta_h\) the mean of those over the stratum. No finite population correction is applied.
Usage
jackknife_estimate(jack, statistic, level = 0.95)
jack_total(jack, variable)
jack_mean(jack, variable)Note
jack_total() / jack_mean() center the replicate deviations on the
per-stratum mean of the deleted-PSU estimates (the standard JKn). The
survey design built by as_svrepdesign() instead uses mse = TRUE, which
centers on the point estimate. Both are legitimate, so the standard errors
from jack_total() and from svytotal() on the same object can differ
slightly.
Examples
spec <- weighting_spec(sample_one, base_weights = pw) |>
step_calibrate(method = "raking",
margins = list(region = c(table(population$region))))
jk <- jackknife_weights(spec, strata = "region", psu = "psu", progress = FALSE)
jackknife_estimate(jk, function(w, d) sum(w * d$employed, na.rm = TRUE))
#> estimate se ci_lower ci_upper
#> 1 1031.456 85.28049 864.3092 1198.603