ei.reg | R Documentation |
Estimate an ecological regression using least squares.
ei.reg(formula, data, ...)
formula |
An R formula object of the form |
data |
data frame containing the variables specified in |
... |
Additional arguments passed to |
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.
A list containing
call |
the call to |
coefficients |
an R x C matrix of estimated population cell fractions |
se |
an R x C matrix of standard errors
for |
cov.matrices |
A list of the C scaled variance-covariance matrices for each of the ecological regressions |
Olivia Lau <olivia.lau@post.harvard.edu> and Ryan T. Moore <rtm@american.edu>
Leo Goodman. 1953. “Ecological Regressions and the Behavior of Individuals.” American Sociological Review 18:663–664.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.