cubestratified {BalancedSampling}R Documentation

Stratified balanced sampling with pooling of landing phases

Description

This is a fast implementation of stratified balanced sampling. To have a fixed sample size, include the inclusion probabilities as a balancing variable in Xbal and make sure the inclusion probabilities sum to a positive integer (within each stratum).

Usage

cubestratified(prob,Xbal,integerStrata)	

Arguments

prob

vector of length N with inclusion probabilities

Xbal

matrix of balancing auxiliary variables of N rows and r columns

integerStrata

vector of length N with stratum number

Value

Returns a vector of length N with sampling indicators.

References

Chauvet, G. (2009). Stratified balanced sampling. Survey Methodology, 35, 115-119.

Examples

## Not run: 
# Example 1
N = 10;
n = 5;
p = rep(n/N,N);
strata = c(1,1,2,2,3,3,4,4,5,5);
indicators = cubestratified(p,cbind(p),strata);
s = (1:N)[indicators==1];

## End(Not run)

[Package BalancedSampling version 1.5.5 Index]