fastflightcube           package:sampling           R Documentation

_F_a_s_t _f_l_i_g_h_t _p_h_a_s_e _f_o_r _t_h_e _c_u_b_e _m_e_t_h_o_d

_D_e_s_c_r_i_p_t_i_o_n:

     Execute the fast flight phase  of the cube method (algorithm of
     Chauvet and Till, 2005, 2006). The data are sorted following the
     argument order. Inclusion probabilities equal to 0 or 1 are
     tolerated.

_U_s_a_g_e:

     fastflightcube(X,pik,order=1,comment=TRUE)

_A_r_g_u_m_e_n_t_s:

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

     pik: vector of inclusion probabilities.

   order: 1, the data are randomly arranged,
           2, no change in data order,
           3, the data are sorted in decreasing order. 

 comment: a comment is written during the execution if 'comment' is
          equal to 'TRUE'.

_R_e_f_e_r_e_n_c_e_s:

     Till, Y. (2006), _Sampling Algorithms_, Springer.
      Chauvet, G. and Till, Y. (2006). A fast algorithm of balanced
     sampling. _to appear in Computational Statistics_. 
      Chauvet, G. and Till, Y. (2005). New SAS macros for balanced
     sampling. In INSEE, editor, _Journes de Mthodologie
     Statistique_, Paris.
      Deville, J.-C. and Till, Y. (2004). Efficient balanced sampling:
     the cube method. _Biometrika_, 91, 893-912.
      Deville, J.-C. and Till, Y. (2005). Variance approximation under
     balanced sampling. _Journal of Statistical Planning and
     Inference_, 128/2:411-425.

_S_e_e _A_l_s_o:

     'samplecube'

_E_x_a_m_p_l_e_s:

     # Matrix of balancing variables
     X=cbind(c(1,1,1,1,1,1,1,1,1),c(1,2,3,4,5,6,7,8,9))
     # 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)
     pikstar

