Smean {samplingbook} | R Documentation |
Sampling Mean Estimation
Description
The function Smean
estimates the population mean out of simple samples either with or without consideration of finite population correction.
Usage
Smean(y, N = Inf, level = 0.95)
Arguments
y |
vector of sample data |
N |
positive integer specifying population size. Default is |
level |
coverage probability for confidence intervals. Default is |
Value
The function Smean
returns a value, which is a list consisting of the components
call |
is a list of call components: |
mean |
mean estimate |
se |
standard error of the mean estimate |
ci |
vector of confidence interval boundaries |
Author(s)
Juliane Manitz
References
Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.
See Also
Examples
data(pop)
Y <- pop$Y
Y
# Draw a random sample of size=3
set.seed(93456)
y <- sample(x = Y, size = 3)
sort(y)
# Estimation with infiniteness correction
est <- Smean(y = y, N = length(pop$Y))
est