Learn R Programming

sampling (version 2.9)

landingcube: Landing phase for the cube method

Description

Landing phase of the cube method using linear programming.

Usage

landingcube(X,pikstar,pik,comment=TRUE)

Arguments

X

matrix of auxiliary variables on which the sample must be balanced.

pikstar

vector obtained at the end of the flight phase.

pik

vector of inclusion probabilities.

comment

a comment is written during the execution if comment is TRUE.

References

Till<e9>, Y. (2006), Sampling Algorithms, Springer. Chauvet, G. and Till<e9>, Y. (2006). A fast algorithm of balanced sampling. Computational Statistics, 21/1:53--62. Chauvet, G. and Till<e9>, Y. (2005). New SAS macros for balanced sampling. In INSEE, editor, Journ<e9>es de M<e9>thodologie Statistique, Paris. Deville, J.-C. and Till<e9>, Y. (2004). Efficient balanced sampling: the cube method. Biometrika, 91:893--912. Deville, J.-C. and Till<e9>, Y. (2005). Variance approximation under balanced sampling. Journal of Statistical Planning and Inference, 128/2:411--425.

See Also

samplecube, fastflightcube

Examples

Run this code
# NOT RUN {
# matrix of balancing variables
X=cbind(c(1,1,1,1,1,1,1,1,1),c(1.1,2.2,3.1,4.2,5.1,6.3,7.1,8.1,9.1))
# Vector of inclusion probabilities
# The sample has the size equal to 3.
pik=c(1/3,1/3,1/3,1/3,1/3,1/3,1/3,1/3,1/3)
# pikstar is almost a balanced sample and is ready for the landing phase
pikstar=fastflightcube(X,pik,order=1,comment=TRUE)
# selection of the sample s
s=landingcube(X,pikstar,pik,comment=TRUE)
round(s)
# }

Run the code above in your browser using DataLab