Description Usage Arguments Value Author(s) References See Also Examples
The function stratasamp
calculates the sample size for each stratum depending on type of allocation.
1 | stratasamp(n, Nh, Sh = NULL, Ch = NULL, type = 'prop')
|
n |
positive integer specifying sampling size. |
Nh |
vector of population sizes of each stratum. |
Sh |
vector of standard deviation in each stratum. |
Ch |
vector of cost for a sample in each stratum. |
type |
type of allocation. Default is |
The function stratasamp
returns a matrix, which lists the strata and the sizes of observation depending on type of allocation.
Shuai Shao and Juliane Manitz
Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.
stratamean
, stratasize
, sample.size.mean
1 2 3 | #random proportional stratified sample
stratasamp(n=500, Nh=c(5234,2586,649,157))
stratasamp(n=500, Nh=c(5234,2586,649,157), Sh=c(251,1165,8035,24725), 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
Stratum 1 2 3 4
Size 303 150 38 9
Stratum 1 2 3 4
Size 49 112 194 145
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.