%% Default Diffuse Prior Model
% 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).
% \texttt{GNPR}_t=\beta_0+\beta_1\texttt{IPI}_t+\beta_2\texttt{E}_t+\beta_3\texttt{WR}_t+\varepsilon_t.
% For all t, \varepsilon_t is a series of independent Gaussian disturbances with a mean of 0 and variance \sigma^2.
% Suppose that the regression coefficients \beta=[\beta_0,...,\beta_3]^\prime and the disturbance variance \sigma^2 are random variables, and their prior values and distribution are unknown. In this case, use the noninformative Jefferys prior: the joint prior distribution is proportional to 1/\sigma ^2.
% These assumptions and the data likelihood imply an analytically tractable posterior distribution.
% Create a diffuse prior model for the linear regression parameters, which is the default model type. Specify the number of predictors p.

p = 3;
Mdl = bayeslm(p)

% Mdl is a diffuseblm Bayesian linear regression model object representing the prior distribution of the regression coefficients and disturbance variance. bayeslm displays a summary of the prior distributions at the command line. Because the prior is noninformative and the model does not contain data, the summary is trivial.
% If you have data, then you can estimate characteristics of the posterior distribution by passing the prior model Mdl and data to estimate.
% Copyright 2012 The MathWorks, Inc.