Hajek (ratio) estimator of a population mean
Usage
morie_survey_hajek_mean(y, weights)
Arguments
- y
Numeric vector of outcome values aligned with the sample.
- weights
Numeric vector of design weights aligned with y.
Value
A named list with elements mean, se, ci_lower, ci_upper.
Examples
set.seed(1)
morie_survey_hajek_mean(rnorm(30, 5), runif(30, 0.5, 2))
#> $mean
#> [1] 5.135128
#>
#> $se
#> [1] 0.1452455
#>
#> $ci_lower
#> [1] 4.850453
#>
#> $ci_upper
#> [1] 5.419804
#>