Horvitz-Thompson estimator of a population total.
Usage
morie_survey_ht_total(y, inclusion_probs)
Arguments
- y
Numeric vector of outcome values aligned with the sample.
- inclusion_probs
Numeric vector of inclusion probabilities
(pi_i) for the Horvitz-Thompson estimator.
Value
list with total, se, ci_lower, ci_upper.
Examples
set.seed(1)
str(morie_survey_ht_total(rnorm(30, 5), runif(30, 0.05, 0.2)), max.level = 1)
#> List of 4
#> $ total : num 1318
#> $ se : num 242
#> $ ci_lower: num 844
#> $ ci_upper: num 1793