deff                  package:Hmisc                  R Documentation

_D_e_s_i_g_n _E_f_f_e_c_t _a_n_d _I_n_t_r_a-_c_l_u_s_t_e_r _C_o_r_r_e_l_a_t_i_o_n

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

     Computes the Kish design effect and corresponding intra-cluster
     correlation for a single cluster-sampled variable

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

     deff(y, cluster)

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

       y: variable to analyze 

 cluster: a variable whose unique values indicate cluster membership. 
          Any type of variable is allowed. 

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

     a vector with named elements 'n' (total number of non-missing
     observations), 'clusters' (number of clusters after deleting
     missing data), 'rho' (intra-cluster correlation), and 'deff'
     (design effect).

_A_u_t_h_o_r(_s):

     Frank Harrell 
      Department of Biostatistics 
      Vanderbilt University 
      f.harrell@vanderbilt.edu

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

     'bootcov', 'robcov'

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

     set.seed(1)
     blood.pressure <- rnorm(1000, 120, 15)
     clinic <- sample(letters, 1000, replace=TRUE)
     deff(blood.pressure, clinic)

