ffphase | R Documentation |
This function computes the flight phase of the cube method proposed by Chauvet and Tillé (2006).
ffphase(Xbal, prob, order = TRUE)
Xbal |
A matrix of size ( |
prob |
A vector of inclusion probabilities. |
order |
if the units are reordered, Default TRUE. |
This function implements the method proposed by (Chauvet and Tillé 2006). It recursively transforms the vector of inclusion probabilities pik
into a
sample that respects the balancing equations. The algorithm stops when the null space of the sub-matrix B
is empty.
For more information see (Chauvet and Tillé 2006).
Updated vector of pik
that contains 0 and 1 for unit that are rejected or selected.
fastflightphase
, cube
.
N <- 100
n <- 10
p <- 4
pik <- rep(n/N,N)
X <- cbind(pik,matrix(rgamma(N*p,4,25),ncol= p))
pikstar <- ffphase(X,pik)
t(X/pik)%*%pikstar
t(X/pik)%*%pik
pikstar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.