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 where ϕ(yt;xtβ,σ2) is the Gaussian probability density evaluated at yt with mean xtβ and variance σ2. The resulting marginal and conditional posterior distributions are analytically tractable. For details on the posterior distribution, see Analytically Tractable Posteriors.
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.
PriorMdl = diffuseblm(NumPredictors)
PriorMdl = diffuseblm(NumPredictors,Name,Value)
creates a Bayesian linear
regression model object (PriorMdl
= diffuseblm(NumPredictors
)PriorMdl
) composed of
NumPredictors
predictors and an intercept. The joint
prior distribution of (β,
σ2) is the diffuse model.
PriorMdl
is a template defining the prior
distributions and dimensionality of β.
uses additional options specified by one or more
PriorMdl
= diffuseblm(NumPredictors
,Name,Value
)Name,Value
pair arguments. Name
is
a property name, except NumPredictors
, and
Value
is the corresponding value.
Name
must appear inside single quotes
(''
). You can specify several
Name,Value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
estimate | Fit parameters of Bayesian linear regression model to data |
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.