Skip to contents

\(\sum(y_i/\pi_i)/\sum(1/\pi_i)\): the Horvitz-Thompson total divided by the ESTIMATED population size. Biased in finite samples – it is a ratio of two random quantities – but the bias is \(O(1/n)\) against a first-order variance reduction, because numerator and denominator move together. That cancellation is the whole argument, and it fails when y is uncorrelated with the weights. Mirrors morie.fn.hjkest.

Usage

morie_hajek_mean(y, pi)

Arguments

y

observed values.

pi

inclusion probabilities in (0, 1].

Value

list: mean, ht_mean_if_N_known, weight_sum, design_unbiased, bias_order, n, method.

Examples

morie_hajek_mean(c(3, 5, 9), c(0.1, 0.2, 0.3))$mean
#> [1] 4.636364