5.6 Bayesian model average
After our GUI is deployed (see Figure 5.1), the user should select Bayesian Model Averaging in the top panel. Then, Figure 5.12 will be displayed, and the user can see the radio button on the left-hand side that shows the specific models inside this generic class.
Bayesian model averaging (BMA) based on a Gaussian distribution can be carried out using the Bayesian information criterion (BIC) approximation, Markov chain Monte Carlo model composition (MC3), instrumental variables (see Figure 5.12), and dynamic BMA. The first two approaches require an input dataset where the first column is the dependent variable, followed by the potentially important regressors.
Users should set the bandwidth model selection parameter (OR) and the number of iterations for BIC and MC3, respectively (see Chapter 10 for technical details). The results include the posterior inclusion probability (p≠0), expected value (EV), and standard deviation (SD) of the coefficients associated with each regressor. The BIC framework also displays the most relevant models with their posterior model probabilities (PMP). Users can download two csv files: Best models and Descriptive statistics coefficients. The former is a 0-1 matrix such that the columns are the regressors and the rows are the models; a 1 indicates the presence of a specific regressor in a specific model, and 0 indicates its absence. Note that the last column of this file is the posterior model probability for each model (row). The latter file shows the posterior inclusion probabilities, expected values, and standard deviations associated with each regressor, taking into account the BMA procedure based on the best models.

Figure 5.12: Bayesian model averaging: Specification.
Bayesian model averaging with endogeneity issues requires two input files. The first file should have the dependent variable in the first column, followed by the regressors with endogeneity issues, and then the exogenous regressors. The user should include a column of 1’s if an intercept is required. The second input file contains all the instruments. Users should also specify the number of regressors with endogeneity issues (see Figure 5.13).

Figure 5.13: Bayesian model averaging: Instrumental variable specification.
The results include the posterior inclusion probabilities and expected values for each regressor. The user can find the results of the main equation, and then of the auxiliary equations. Users can download csv files of BMA results for both the second stage (main equation) and the first stage (auxiliary equations). In addition, users can download the posterior chains of the location parameters of the main equation, βl, l=1,2,\dots,dim\left\{\boldsymbol{\beta}\right\}, the location parameters of the auxiliary equations, \gamma_{j,i}, j=1,2,\dots,dim\left\{\boldsymbol{\beta}_s\right\} where dim\left\{\boldsymbol{\beta}_s\right\} is the number of regressors with endogeneity issues, i=1,2,\dots,dim\left\{\boldsymbol{\gamma}\right\}, where dim\left\{\boldsymbol{\gamma}\right\} is the number of regressors in the auxiliary regressors (exogenous regressors + instruments), and the elements of the covariance matrix \sigma_{j,k} (see Chapter 10 for technical details).
Dynamic BMA also requires two files. The first is the dataset with the dependent variable and potential regressors, and the second file describes the competing models. There is one column for each regressor and one row for each competing model; 0 indicates that the regressor is not in the model, and 1 indicates that it is in the model. Users can see templates of this file in the folders DataSim and DataApp (see the Appendix for details) of our GitHub repository.
Then, the users should set the forgetting parameters of the covariance and transition matrices and click the Go! button. A plot of the PMPs of the competing models is displayed, and users can click the Download the results for DBMA. Two files are downloaded: the first contains the dynamic Bayesian average filtering recursions for each state, and the second contains the PMP of each model and the dynamic Bayesian model averaging prediction.
Bayesian model averaging based on BIC approximation for non-linear models (Logit, Gamma, and Poisson) requires an input dataset where the first column is the dependent variable, and the other columns are the potentially relevant regressors. Users should specify the bandwidth model selection parameters, also referred to as Occam’s window parameters (O_R and O_L). Our GUI displays the posterior inclusion probabilities (p \neq 0), the expected value of the posterior coefficients (EV), and the standard deviation (SD). In addition, users can view the results associated with the models with the highest posterior model probabilities and download csv files with the results of specifications of the best models and descriptive statistics of the posterior coefficients from the BMA procedure. These files are similar to the results of the BIC approximation for the Gaussian model.