ei.reg                package:eiPack                R Documentation

_E_c_o_l_o_g_i_c_a_l _r_e_g_r_e_s_s_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Estimate an ecological regression using least squares.

_U_s_a_g_e:

     ei.reg(formula, data, ...)

_A_r_g_u_m_e_n_t_s:

 formula: An R formula object of the form 'cbind(c1, c2, ...) ~
          cbind(r1, r2, ...)'

    data: data frame containing the variables specified in 'formula'

     ...: Additional arguments passed to 'lm'. 

_D_e_t_a_i_l_s:

     For i in 1,...,C, C regressions of the form 'c_i ~ cbind(r1, r2,
     ...)' are performed.

     These regressions make use of the accounting identities and the
     constancy assumption, that beta_rci = beta_rc for all i.

     The accounting identities include

   - defining the population cell fractions beta_rc such that
        sum_{c=1}^{C} beta_rc  =  1 for every r

   - sum_{c=1}^{C} beta_rci  = 1 for r = 1,...,R and i = 1,...,n

   - T_ci = sum_{r=1}^R beta_rci X_ri for c = 1,...,C and i = 1,...,n

     Then regressing 

                   T_ci = beta_rc X_ri + epsilon_ci

     for c = 1,...C recovers the population parameters beta_rc when the
     standard linear regression assumptions apply, including
     E[epsilon_ci] = 0 and Var[epsilon_ci] = sigma_c^2 for all i.

_V_a_l_u_e:

     A list containing  

    call: the call to 'ei.reg'

coefficients: an R x C matrix of estimated population cell fractions

      se: an R x C matrix of standard errors for 'coefficients'.

cov.matrices: A list of the C scaled variance-covariance matrices for
          each of the ecological regressions

_A_u_t_h_o_r(_s):

     Olivia Lau <olivia.lau@post.harvard.edu> and Ryan T. Moore
     <rtm@wustl.edu>

_R_e_f_e_r_e_n_c_e_s:

     Leo Goodman. 1953. ``Ecological Regressions and the Behavior of
     Individuals.'' _American Sociological Review_ 18:663-664.

