Description Usage Arguments Value Author(s) References See Also Examples
View source: R/sample.size.mean.R
The function sample.size.mean
returns the sample size needed for mean estimations either with or without consideration of finite population correction.
1 | sample.size.mean(e, S, N = Inf, level = 0.95)
|
e |
positive number specifying the precision which is half width of confidence interval |
S |
standard deviation in population |
N |
positive integer for population size. Default is |
level |
coverage probability for confidence intervals. Default is |
The function sample.size.mean
returns a value, which is a list consisting of the components
call |
is a list of call components: |
n |
estimate of sample size |
Juliane Manitz
Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.
1 2 3 4 | # sample size for precision e=4
sample.size.mean(e=4,S=10,N=300)
# sample size for precision e=1
sample.size.mean(e=1,S=10,N=300)
|
Loading required package: pps
Loading required package: sampling
Loading required package: survey
Loading required package: grid
Loading required package: Matrix
Loading required package: survival
Attaching package: 'survival'
The following objects are masked from 'package:sampling':
cluster, strata
Attaching package: 'survey'
The following object is masked from 'package:graphics':
dotchart
sample.size.mean object: Sample size for mean estimate
With finite population correction: N=300, precision e=4 and standard deviation S=10
Sample size needed: 23
sample.size.mean object: Sample size for mean estimate
With finite population correction: N=300, precision e=1 and standard deviation S=10
Sample size needed: 169
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.