Skip to contents

\(\hat T = \sum_{i \in s} y_i/\pi_i\). Design-unbiased for ANY design with strictly positive inclusion probabilities – no model, no distributional assumption. Its weakness is the same coin: it never uses a known population size, so when the weights happen to sum to much more or less than N, the estimate inherits that error directly. Mirrors morie.fn.htest1.

Usage

morie_horvitz_thompson(y, pi, N = NULL)

Arguments

y

observed values for the sampled units.

pi

inclusion probabilities in (0, 1].

N

known population size, for comparison.

Value

list: total, mean, weight_sum, implied_N, N, design_unbiased, uses_known_N, n, method.

Examples

morie_horvitz_thompson(c(3, 5, 9), c(0.1, 0.2, 0.3))$total
#> [1] 85