Consider the multiple linear regression model that predicts the US real gross national product (`GNPR`

) using a linear combination of industrial production index (`IPI`

), total employment (`E`

), and real wages (`WR`

).

$${\text{GNPR}}_{t}={\beta}_{0}+{\beta}_{1}{\text{IPI}}_{t}+{\beta}_{2}{\text{E}}_{t}+{\beta}_{3}{\text{WR}}_{t}+{\epsilon}_{t}.$$

For all $$t$$, $${\epsilon}_{t}$$ is a series of independent Gaussian disturbances with a mean of 0 and variance $${\sigma}^{2}$$.

Assume these prior distributions for $\mathit{k}$ = 0,...,3:

$${\beta}_{k}|{\sigma}^{2},{\gamma}_{k}={\gamma}_{k}\sigma \sqrt{{V}_{k1}}{Z}_{1}+(1-{\gamma}_{k})\sigma \sqrt{{V}_{k2}}{Z}_{2}$$, where ${\mathit{Z}}_{1}$ and ${\mathit{Z}}_{2}\text{\hspace{0.17em}}$are independent, standard normal random variables. Therefore, the coefficients have a Gaussian mixture distribution. Assume all coefficients are conditionally independent, a priori, but they are dependent on the disturbance variance.

$${\sigma}^{2}\sim IG(A,B)$$. $$A$$ and $$B$$ are the shape and scale, respectively, of an inverse gamma distribution.

${\gamma}_{\mathit{k}}\in \left\{0,1\right\}$and it represents the random variable-inclusion regime variable with a discrete uniform distribution.

Create a prior model for SSVS. Specify the number of predictors `p`

.

`PriorMdl`

is a `mixconjugateblm`

Bayesian linear regression model object for SSVS predictor selection representing the prior distribution of the regression coefficients and disturbance variance.

Summarize the prior distribution.

| Mean Std CI95 Positive Distribution
------------------------------------------------------------------------------
Intercept | 0 1.5890 [-3.547, 3.547] 0.500 Mixture distribution
IPI | 0 1.5890 [-3.547, 3.547] 0.500 Mixture distribution
E | 0 1.5890 [-3.547, 3.547] 0.500 Mixture distribution
WR | 0 1.5890 [-3.547, 3.547] 0.500 Mixture distribution
Sigma2 | 0.5000 0.5000 [ 0.138, 1.616] 1.000 IG(3.00, 1)

The function displays a table of summary statistics and other information about the prior distribution at the command line.

Load the Nelson-Plosser data set, and create variables for the predictor and response data.

Estimate the posterior distributions. Suppress the estimation display.

`PosteriorMdl`

is an `empiricalblm`

model object that contains the posterior distributions of $$\beta $$ and $${\sigma}^{2}$$.

Obtain summary statistics from the posterior distribution.

`summary`

is a structure array containing two fields: `MarginalDistributions`

and `JointDistribution`

.

Display the marginal distribution summary by using dot notation.

ans=*5×5 table*
Mean Std CI95 Positive Distribution
__________ _________ ________________________ ________ _____________
Intercept -18.66 10.348 -37.006 0.8406 0.0412 {'Empirical'}
IPI 4.4555 0.15287 4.1561 4.7561 1 {'Empirical'}
E 0.00096765 0.0003759 0.00021479 0.0016644 0.9968 {'Empirical'}
WR 2.4739 0.36337 1.7607 3.1882 1 {'Empirical'}
Sigma2 47.773 8.6863 33.574 67.585 1 {'Empirical'}

The `MarginalDistributions`

field is a table of summary statistics and other information about the posterior distribution.