stratasamp: Sample Size Calculation for Stratified Sampling

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

View source: R/stratasamp.R

Description

The function stratasamp calculates the sample size for each stratum depending on type of allocation.

Usage

1
stratasamp(n, Nh, Sh = NULL, Ch = NULL, type = 'prop')

Arguments

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 type='prop' for proportional, alternatives are type='opt' for optimal and type='costopt' for cost-optimal.

Value

The function stratasamp returns a matrix, which lists the strata and the sizes of observation depending on type of allocation.

Author(s)

Shuai Shao and Juliane Manitz

References

Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.

See Also

stratamean, stratasize, sample.size.mean

Examples

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')

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