| ratio_estimator | R Documentation |
The ratio estimator X * Y_hat / X_hat, where X is the known population
total of the auxiliary (the area of the segments, the number of farms from
a census), with the variance of the residuals y - R x under the design,
estimated as in design_variance(). The gain over the Horvitz-Thompson
estimate is reported.
ratio_estimator(sample, y, x, x_total = NULL)
sample |
A |
y |
Column of the study variable (observed on the sampled units; other
rows may be |
x |
Column of the auxiliary variable. |
x_total |
Known population total of |
A one-row tibble as in design_variance() plus ratio, x_total
and variance_ht (the variance of the plain Horvitz-Thompson estimate).
cells <- expand.grid(x = 1:12, y = 1:12)
cells$unit <- paste0("c", 1:144)
cells$farmland <- runif(144, 20, 100)
cells$crop <- 0.4 * cells$farmland + rnorm(144, sd = 3)
s <- select_units(cells, n = 24, seed = 2)
ratio_estimator(s, y = "crop", x = "farmland")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.