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.1428042
#>
#> $ci_lower
#> [1] 4.855237
#>
#> $ci_upper
#> [1] 5.41502
#>