
Last chance! 50% off unlimited learning
Sale ends in
Xbal
and make sure the inclusion probabilities sum to a positive integer (within each stratum). Euclidean distance is used in the Xspread
space.lcubestratified(prob,Xspread,Xbal,integerStrata)
# 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];
Run the code above in your browser using DataLab