stratsrs: Stratified simple random sampling

Description Usage Arguments Value Note Examples

View source: R/pps.r

Description

In each stratum, select a simple random sample

Usage

1
stratsrs(stratum,nh)

Arguments

stratum

A vector of stratum codes, sorted by stratum

nh

A vector containing the sample size in each stratum

Value

Returns the indices of the units that were selected in the sample

Note

See the user's guide, pps-ug.pdf, for more information.

Examples

1
2
3
strat <- c(1,1,1,1,1,2,2,2,3,3,3,3,3,3,3)  # stratum 1 has 5 units, etc. 
nh <- c(2,1,3)  # select 2 units from stratum 1, 1 from stratum 2 and 3 from 3
stratsrs(strat,nh)

Example output

[1]  1  4  8 13 10 14

pps documentation built on Jan. 17, 2021, 9:06 a.m.

Related to stratsrs in pps...