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 i1,,Ci \in 1,\ldots,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 βrci=βrc\beta_{rci} = \beta_{rc} for all ii.

The accounting identities include

Then regressing

Tci=βrcXri+ϵciT_{ci} = \beta_{rc} X_{ri} + \epsilon_{ci}

for c=1,,Cc = 1,\dots,C recovers the population parameters βrc\beta_{rc} when the standard linear regression assumptions apply, including E[ϵci]=0E[\epsilon_{ci}] = 0 and Var[ϵci]=σc2Var[\epsilon_{ci}] = \sigma_c^2 for all ii.

Value

A list containing

call

the call to ei.reg

coefficients

an R×CR \times C matrix of estimated population cell fractions

se

an R×CR \times C matrix of standard errors for coefficients.

cov.matrices

A list of the CC scaled variance-covariance matrices for each of the ecological regressions

Author(s)

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

References

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


[Package eiPack version 0.2-2 Index]