cleanstrata {sampling}R Documentation

Clean strata

Description

Renumber a variable of stratification (qualitative variable). The strata receive a number from 1 to the last stratum. The empty strata are suppressed. This function is used in 'balancedstratification'.

Usage

cleanstrata(st)

Arguments

st vector with the numbers of the strata.

See Also

balancedstratification

Examples

# definition of the stratification variable
strat=c(-2,3,-2,3,4,4,4,-2,-2,3,4,0,0,0)
# renumber the strata
cleanstrata(strat)

[Package sampling version 0.2 Index]