regression.coefficient.conjugate.prior {Boom}R Documentation

Regression Coefficient Conjugate Prior

Description

A conjugate prior for regression coefficients, conditional on residual variance, and sample size.

Usage

  RegressionCoefficientConjugatePrior(
    mean,
    sample.size,
    additional.prior.precision = numeric(0),
    diagonal.weight = 0)

Arguments

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 mean in the posterior distribution.

additional.prior.precision

A vector of non-negative numbers representing the diagonal matrix \Lambda^{-1} below. Positive values for additional.prior.precision will ensure the distribution is proper even if the regression model has no data. If all columns of the design matrix have positive variance then additional.prior.precision can safely be set to zero. A zero-length numeric vector is a slightly more efficient equivalent to a vector of all zeros.

diagonal.weight

The weight given to the diagonal when XTX is averaged with its diagonal. The purpose of diagonal.weight is to keep the prior distribution proper even if X is less than full rank. If the design matrix is full rank then diagonal.weight can be set to zero.

Details

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 | \sigma^2, X \sim % N(b, \sigma^2 (\Lambda^{-1} + V

where

V^{-1} = \frac{\kappa}{n} ((1 - w) X^TX + w diag(X^TX)) .

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).

Author(s)

Steven L. Scott steve.the.bayesian@gmail.com

References

Gelman, Carlin, Stern, Rubin (2003), "Bayesian Data Analysis", Chapman and Hall.


[Package Boom version 0.9.15 Index]