User’s Guide : Multiple Equation Analysis : Bayesian VAR Models : Examples
  
Examples
 
Investment Example
Basic Settings
Alternate priors
Macroeconomic Variables Example
Investment Example
To illustrate the Bayesian approach, we first estimate the coefficients of a VAR(2) model using the first differences of the logarithm of the investment (DLINVESTMENT), income (DLINCOME), and consumption (DLCONCUMPTION). The raw data are provided in the EViews workfile “wgmacro.WF1”. This data set was examined by Lütkepohl (2007, page 228).
Click on Quick/Estimate VAR... to open the main VAR specification dialog. In the VAR type box, select Bayesian VAR and in the Endogenous Variables box, type:
dlincome dlinvestment dlconsumption
Here, you will see the pre-filled settings including the variable names. You may change the default settings, but for now on, we assume that the default settings are used.
Basic Settings
Next, click on the Prior type tab to select the prior type for the VAR. By default, EViews will choose the Litterman/Minnesota for the Prior type and the Univariate AR option for the Initial residual covariance, but you can change the prior type and the initial covariance calculation option from the menus.
The Hyper-parameters tab shows the hyper-parameter settings. Note that the settings may vary depending on the prior type. We will only change the hyper-parameter, Mu1 to be equal to zero (since the data are all differenced):
Click on OK to accept the dialog settings. EViews estimates the VAR and displays the results view. The results are shown below:
The heading information provides the basic information about the settings used in estimation, and the basic prior information, including hyper-parameter values. Just below the heading, the mean and standard errors from the posterior distribution are displayed.
The bottom portion of the output displays standard classical summary statistics for a VAR. Although they do not have a Bayesian interpretation, they are displayed for comparison purposes.
In his study of this data, Lütkepohl chose to use a diagonal VAR to calculate the initial residual covariance. We can replicate his results by setting the Diagonal VAR covariance type on the Prior type tab of the dialog:
Since the estimates in the third row of Table 5.3 of Lütkepohl’s example may be obtained using EViews’ default hyper-parameter values (other than the previously changed Mu1), click on OK to estimate the modified BVAR specification:
The results in the other rows of table Table 5.3 may be obtained by changing the hyper-parameters.
Alternate priors
To illustrate the importance of prior selection, we estimate the same model using the Sims-Zha normal-Wishart prior, with the univariate AR calculation for the initial residual covariance, and the default hyper-parameter settings:
We can see that, for these data and VAR specification, changing the prior type did not have a large impact on any of the parameter values:
Macroeconomic Variables Example
As a second example of using Bayesian VARs in EViews, we work with a dataset created by Stock and Watson (2008) which provides data on a number of US macroeconomic variables. The dataset was obtained from Mark Watson’s website: http://www.princeton.edu/~mwatson/publi.html, and a truncated version, with only variables used in this example, is provided as the EViews workfile “stockwatson.wf1”. These data are used in Giannone, Lenza and Primiceri 2012, among other studies.
We will estimate a VAR using the same series as Giannone, Lenza and Primiceri’s “Medium-scale model”. This model contains seven series: Gross domestic product (GDP), the GDP deflator (GDPI), consumption (CONS), investment (INV), hours worked (HOURS), wages (WAGES), and the federal funds rate (FED). The first six variables were reported at a quarterly frequency. The federal funds rate is reported at a monthly rate, so the quarterly average is used to convert the data to quarterly. All variables have been logged and multiplied by four (to give annualized values), with the exception of the funds rate which is left in levels.
To estimate the VAR we click on Quick/Estimate VAR… to open the main VAR specification dialog. We select Bayesian VAR as the VAR type, and in the Endogenous Variables box we type:
gdp gdpi cons inv hours wages fed
To estimate the VAR with 5 lags, in the Lags for endogenous edit field we enter:
1 5
To begin we will estimate with a normal-Wishart prior, including dummy observations to account for both unit roots and cointegration:
We keep the hyper-parameters at their default values. Clicking OK will estimate the VAR and display the results (the top portion of which are displayed below):
Having estimated the VAR, we will look at the impulse responses to a shock in GDP. We bring up the Impulse Response dialog by clicking the Impulse button on the VAR. We enter “GDP” in the Impulses box and keep all other settings at their defaults.
Clicking OK will produce a graph of the responses:
We would like to compare these results with those obtained assuming independent normal-Wishart priors.
We follow the steps above a second time, beginning with estimation, but after changing the prior to Independent normal-Wishart. The resulting responses are: