permuteinstrata: Randomize units within strata

Description Usage Arguments Value Note Examples

View source: R/pps.r

Description

Randomize the order of units within each stratum

Usage

1
permuteinstrata(stratsizes)

Arguments

stratsizes

A vector containing the size of each stratum

Value

Returns the vector of permuted indices. In the example below, the returned vector has 29 elements.

Note

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

Examples

1
2
stratsizes <- c(9,10,10)  # strata have 9, 10 and 10 units, respectively
permuteinstrata(stratsizes)

Example output

 [1]  4  6  8  5  7  3  1  9  2 19 17 14 16 12 15 18 11 10 13 22 27 28 21 24 23
[26] 25 29 26 20

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

Related to permuteinstrata in pps...