Description Usage Arguments Value Author(s) References See Also Examples
The function stratasize
determinates the total size of stratified samples depending on type of allocation and determinated by specified precision.
1 | stratasize(e, Nh, Sh, level = 0.95, type = 'prop')
|
e |
positive number specifying sampling precision. |
Nh |
vector of population sizes in each stratum. |
Sh |
vector of standard deviation in each stratum. |
level |
coverage probability for confidence intervals. Default is |
type |
type of allocation. Default is |
The function stratasize
returns a value, which is a list consisting of the components
call |
is a list of call components: |
n |
determinated total sample size. |
Shuai Shao
Kauermann, Goeran/Kuechenhoff, Helmut (2011): Stichproben. Methoden und praktische Umsetzung mit R. Springer.
1 2 3 4 5 | #random proportional stratified sample
stratasize(e=0.1, Nh=c(100000,300000,600000), Sh=c(1,2,3))
#random optimal stratified sample
stratasize(e=0.1, Nh=c(100000,300000,600000), Sh=c(1,2,3), type="opt")
|
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
stratamean object: Stratified sample size determination
type of sample: prop
total sample size determinated: 2568
stratamean object: Stratified sample size determination
type of sample: opt
total sample size determinated: 2395
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.