Skip to contents

Equations 10.13, 10.14, 10.17, 10.18, 10.25, 10.42 of Brus (2022).

Usage

morie_greg_variance(
  e = NULL,
  n = NA,
  n_population = NA,
  x_k = NA,
  xbar_true = NA,
  xbar_sample = NA,
  s2_x = NA,
  g = NULL,
  pi = NULL,
  ratio = FALSE
)

Arguments

e

Residuals.

n, n_population

Sizes.

x_k, xbar_true, xbar_sample, s2_x

Simple g-weight pieces.

g

g-weights for the weighted variance.

pi

Inclusion probabilities (calibration-residual route).

ratio

If TRUE return the N^2 S2(e)/n ratio-total variance.

Value

List with s2_e, variance, g_weight, g_variance, ratio_variance, mc_variance (as supplied).

Examples

# variance of a GREG total from 20 sampled residuals out of N = 500
set.seed(1)
e <- rnorm(20)
morie_greg_variance(e, n = 20, n_population = 500)$variance
#> [1] 0.04186763