regression.coefficient.conjugate.prior | R Documentation |
A conjugate prior for regression coefficients, conditional on residual variance, and sample size.
RegressionCoefficientConjugatePrior( mean, sample.size, additional.prior.precision = numeric(0), diagonal.weight = 0)
mean |
The mean of the prior distribution, denoted 'b' below. See Details. |
sample.size |
The value denoted 'kappa' below.
This can be interpreted as a number of observations worth of weight
to be assigned to |
additional.prior.precision |
A vector of non-negative numbers
representing the diagonal matrix Lambda^{-1}
below. Positive values for |
diagonal.weight |
The weight given to the diagonal when XTX is
averaged with its diagonal. The purpose of |
A conditional prior for the coefficients (beta) in a linear regression model. The prior is conditional on the residual variance sigma^2, the sample size n, and the design matrix X. The prior is
beta | sigsq, X ~ N(b, sigsq * (Lambda^{-1} + V))
where
V^{-1} = ((1 - w) * XTX + w * Diag(XTX)) * kappa / n.
The prior distribution also depends on the cross product matrix XTX and the sample size n, which are not arguments to this function. It is expected that the underlying C++ code will get those quantities elsewhere (presumably from the regression modeled by this prior).
Steven L. Scott steve.the.bayesian@gmail.com
Gelman, Carlin, Stern, Rubin (2003), "Bayesian Data Analysis", Chapman and Hall.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.