Learn R Programming

pps (version 1.0)

permuteinstrata: Randomize units within strata

Description

Randomize the order of units within each stratum

Usage

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.

Examples

Run this code
# NOT RUN {
stratsizes <- c(9,10,10)  # strata have 9, 10 and 10 units, respectively
permuteinstrata(stratsizes)
# }

Run the code above in your browser using DataLab