Skip to contents

Equation 8.2 of Brus (2022): sum((z_k/p_k - t_hat)^2)/(n(n-1)).

Usage

morie_pps_variance(z, p, t_hat)

Arguments

z

Sample values.

p

Draw probabilities.

t_hat

Estimated total.

Value

Numeric variance estimate.

Examples

z <- c(12, 9, 15); p <- c(0.2, 0.3, 0.5)
t_hat <- sum(z / p) / length(z)
# the Hansen-Hurwitz variance estimator from the sample
morie_pps_variance(z, p, t_hat)
#> [1] 100