Smean: Sampling Mean Estimation

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/Smean.R

Description

The function Smean estimates the population mean out of simple samples either with or without consideration of finite population correction.

Usage

1
Smean(y, N = Inf, level = 0.95)

Arguments

y

vector of sample data

N

positive integer specifying population size. Default is N=Inf, which means that calculations are carried out without finite population correction.

level

coverage probability for confidence intervals. Default is level=0.95.

Value

The function Smean returns a value, which is a list consisting of the components

call

is a list of call components: y vector with sample data, n sample size, N population size, level coverage probability for confidence intervals

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

Sprop, sample.size.mean

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

jmanitz/samplingbook documentation built on April 10, 2021, 4:44 p.m.