\(\hat R = \sum w y/\sum w x\), \(\hat{\bar Y}_R = \hat R
\bar X\). Beats the simple mean exactly when the correlation
exceeds \(CV(x)/(2 CV(y))\) – the threshold is computed and
compared against the data rather than left as folklore. Biased to
order \(1/n\). Mirrors morie.fn.ratest.
Usage
morie_ratio_estimator(y, x, weights = NULL, X_total = NULL, X_mean = NULL)
Arguments
- y, x
study and auxiliary variables.
- weights
design weights; equal when NULL.
- X_total, X_mean
the known population total or mean of x; one
is required, since that is what the estimator borrows.
Value
list: ratio, mean, total, improves_on_simple_mean,
efficiency_threshold, correlation, cv_x, cv_y, biased, n, method.
Examples
set.seed(1)
x <- rexp(50, 0.1)
morie_ratio_estimator(2 * x + rnorm(50), x, X_mean = 10)$improves_on_simple_mean
#> [1] TRUE