lcubestratified: Stratified doubly balanced sampling with pooling of landing...

Description Usage Arguments Value References Examples

View source: R/RcppExports.R

Description

This is a fast implementation of stratified doubly 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). Euclidean distance is used in the Xspread space.

Usage

1
lcubestratified(prob,Xspread,Xbal,integerStrata)	

Arguments

prob

vector of length N with inclusion probabilities

Xspread

matrix of (standardized) auxiliary variables of N rows and q columns

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.

Grafstr<c3><b6>m, A. and Till<c3><a9>, Y. (2013). Doubly balanced spatial sampling with spreading and restitution of auxiliary totals. Environmetrics, 24(2), 120-131.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Example 1
N = 10;
n = 5;
p = rep(n/N,N);
Xspread = cbind(1:N);
strata = c(1,1,1,1,1,1,2,2,2,2);
indicators = lcubestratified(p,Xspread,cbind(p),strata);
s = (1:N)[indicators==1];

## End(Not run)

jlisic/BalancedSampling documentation built on May 19, 2019, 12:46 p.m.