| razao_estima_media | R Documentation |
Estimates the population mean using the ratio estimator
(Eq. 7.36-7.38 of the course notes). Unlike razao_estima_R(), this
does not require knowing X (the population total of the auxiliary
variable) – only N.
razao_estima_media(
x = NULL,
y = NULL,
n = NULL,
sum_x = NULL,
sum_y = NULL,
sum_x2 = NULL,
sum_y2 = NULL,
sum_xy = NULL,
N,
X = NULL,
conf = 0.95,
...
)
x, y |
Optional raw numeric vectors (sample data). |
n, sum_x, sum_y, sum_x2, sum_y2, sum_xy |
Optional pre-aggregated summary statistics, used when raw data are not available (e.g. a problem statement that only gives totals). |
N |
Population size. |
X |
Optional population total of the auxiliary variable; not
needed to compute the mean itself (only |
conf |
Confidence level, default |
... |
Ignored (see package overview on tolerated extra arguments). |
A sampling_result object with the estimated mean, its
variance, and confidence interval.
x <- c(1, 30, 44, 20, 0, 10, 15, 5, 2, 50, 35, 25)
y <- c(2, 35, 50, 27, 1, 15, 17, 7, 0, 53, 35, 30)
razao_estima_media(x = x, y = y, N = 1500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.