ei.reg.bayes | R Documentation |
Estimate an ecological regression using Bayesian normal regression.
ei.reg.bayes(formula, data, sample = 1000, weights = NULL, truncate=FALSE)
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 |
For i in 1,...,C, C 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
y| beta, sigma^2, X ~ N(X beta, sigma^2*I)
The improper prior is p(beta,sigma^2|X) proportional to 1/sigma^2.
The proper prior is p(beta, sigma^2|x) proportional to I(beta in [0,1])* 1/sigma^2.
A list containing
call |
the call to |
draws |
A, R x C x sample array containing posterior draws for each population cell fraction |
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.