compressWeights            package:survey            R Documentation

_C_o_m_p_r_e_s_s _r_e_p_l_i_c_a_t_e _w_e_i_g_h_t _m_a_t_r_i_x

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

     Many replicate weight matrices have redundant rows, such as when
     weights are the same for all observations in a PSU.  This function
     produces a compressed form. Methods for 'as.matrix' and
     'as.vector' extract and expand the weights.

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

     compressWeights(rw, ...)
     ## S3 method for class 'svyrep.design':
     compressWeights(rw,...)
     ## S3 method for class 'repweights_compressed':
     as.matrix(x,...)
     ## S3 method for class 'repweights_compressed':
     as.vector(x,...)

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

      rw: A set of replicate weights or a 'svyrep.design' object

       x: A compressed set of replicate weights

     ...: For future expansion

_V_a_l_u_e:

     An object of class 'repweights_compressed' or a 'svyrep.design'
     object with 'repweights' element of class 'repweights_compressed'

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

     'jknweights','as.svrepdesign'

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

     data(api)
     dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
     rclus1c<-as.svrepdesign(dclus1,compress=TRUE)
     rclus1<-as.svrepdesign(dclus1,compress=FALSE)

