ei.reg.bayes {eiPack} | R Documentation |
Ecological regression using Bayesian Normal regression
Description
Estimate an ecological regression using Bayesian normal regression.
Usage
ei.reg.bayes(formula, data, sample = 1000, weights = NULL, truncate=FALSE)
Arguments
formula |
An R formula object of the form |
data |
data frame containing the variables specified in formula |
sample |
number of draws from the posterior |
weights |
a vector of weights |
truncate |
if TRUE, imposes a proper uniform prior on the unit hypercube for the coefficients; if FALSE, an improper uniform prior is assumed |
Details
For ,
Bayesian regressions
of the form
c_i ~ cbind(r1, r2, ...)
are
performed. See the documentation for ei.reg
for the accounting
identities and constancy assumption underlying this Bayesian linear
model.
The sampling density is given by
The improper prior is .
The proper prior is .
Value
A list containing
call |
the call to |
draws |
A, |
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.