Main Content

Bayesian linear regression model with diffuse conjugate prior for data likelihood

The Bayesian linear regression
model object `diffuseblm`

specifies that the joint prior
distribution of (*β*,*σ*^{2})
is proportional to 1/*σ*^{2} (the
*diffuse prior model*).

The data likelihood is $$\prod _{t=1}^{T}\varphi \left({y}_{t};{x}_{t}\beta ,{\sigma}^{2}\right)},$$ where
*ϕ*(*y _{t}*;

In general, when you create a Bayesian linear regression model object, it specifies the joint prior distribution and characteristics of the linear regression model only. That is, the model object is a template intended for further use. Specifically, to incorporate data into the model for posterior distribution analysis, pass the model object and data to the appropriate object function.

creates a Bayesian linear
regression model object (`PriorMdl`

= diffuseblm(`NumPredictors`

)`PriorMdl`

) composed of
`NumPredictors`

predictors and an intercept, and sets
the `NumPredictors`

property. The joint prior
distribution of (*β*,
*σ*^{2}) is the diffuse model.
`PriorMdl`

is a template that defines the prior
distributions and the dimensionality of *β*.

sets properties (except
`PriorMdl`

= diffuseblm(`NumPredictors`

,`Name,Value`

)`NumPredictors`

) using name-value pair arguments.
Enclose each property name in quotes. For example,
`diffuseblm(2,'VarNames',["UnemploymentRate"; "CPI"])`

specifies the names of the two predictor variables in the model.

`estimate` | Estimate posterior distribution of Bayesian linear regression model parameters |

`simulate` | Simulate regression coefficients and disturbance variance of Bayesian linear regression model |

`forecast` | Forecast responses of Bayesian linear regression model |

`plot` | Visualize prior and posterior densities of Bayesian linear regression model parameters |

`summarize` | Distribution summary statistics of standard Bayesian linear regression model |

The `bayeslm`

function can create any supported prior model object for Bayesian linear regression.