ei.reg {eiPack}R Documentation

Ecological regression

Description

Estimate an ecological regression using least squares.

Usage

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

Arguments

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.

Details

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

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.

Value

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

normal-bracket33bracket-normal

Author(s)

Olivia Lau <olau@fas.harvard.edu> and Ryan T. Moore <rtmoore@fas.harvard.edu>

References

Leo Goodman. 1953. ``Ecological Regressions and the Behavior of Individuals.'' American Sociological Review 18:663–664.


[Package eiPack version 0.1-2 Index]