All the programs can be freely downloaded for the purpose of research and academic communication.
It cannot be resold or used for any commercial purpose.
Comments and suggestions are sincerely appreciated.
Bayesian Econometrics Tools
The Bayesian linear regression package includes a graphical user interface to estimate the model with MCMC.
With Lindley and Smith (1972) proper priors, draws from posterior conditionals of Beta and Sigma2 are obtained successively.
When the priors are flat, you will find that the posterior means of Beta and Sigma2 are similar to the OLS estimator.
More on Bayesian Linear Regression
The Bayesian Linear Regression and More package includes a graphical user interface to run a regression model with flexible disturbance specifications.
It can estimate:
1) Baseline Bayesian linear regression.
2) Regression with AR(1) disturbances.
3) Regression with student-t disturbances (scaled normal mixture).
4) Regression with skewed normal disturbances.
MCMC is used to obtain posterior draws. Most models use pure Gibbs sampler, and the student-t disturbances regression uses Metropolis in Gibbs.
Bayesian Hidden Markov Chain (HMM)
Bayesian Hidden Markov Chain (HMM) package includes a graphic interface to estimate the HMM model. The model is driven by Markov switching regimes which are unobservable. Conditional on a latent state, it is a standard regression model, or multivariate normal variates. The package provides two methods to sample latent states: one is by Baum-Welch recursive algorithm, and the other is by a direct procedure using two adjacent states. Geweke (2007) permutation augmented posterior simulator is used to address the permutation invariance problem.
Bayesian Finite Gaussian Mixture
Bayesian Gaussian Mixture package includes a graphic interface to estimate linear regression models with finite number of hidden regimes. Geweke (2007) permutation augmented posterior simulator is used to address the permutation invariance problem.
Bayesian Regime Switch Regression
The Bayesian regime switch regression package includes a graphical user interface to assist estimation. The switch of regime breaks the regression into two regression models with different slopes and disturbance variances. The regime switch time is unknown and has a uniform prior. Then the posterior is proportional to the likelihood in which switch occurs at a given time. Priors and posteriors of other parameters follow the standard linear regression model.
Bayesian Regression with Restricted Parameters
Bayesian Regression with Restricted Parameters package illustrates the Gibbs sampling of regression with inequality constraints developed by Geweke (1996). The algorithm constructs new covariates by a linear transformation of the old covariates using the constraint matrix. Then the standard Gibbs sampler applies. Though the constraints are in the form of inequalities, it can accommodate equality constraints by setting identical lower and upper bounds.
Bayesian Seemingly Unrelated Regression (SUR)
The Bayesian SUR package contains a Matlab function to estimate the model with MCMC.
With Lindley and Smith (1972) proper priors, draws of conjugate posterior Beta and covariance matrix are obtained from multivariate normal and Wishart distribution respectively.
SUR model plays an important role in Bayesian econometrics, but the Gibbs sampler is computationally intensive. Therefore, there is a need to optimize the codes.
Data are normalized by the covariance matrix, which substantially reduces the computation of matrix inversion.
Bayesian Vector AutoRegression (VAR)
The VAR package includes a graphical user interface to estimate the reduced form VAR system. By properly rearranging dependent variables and regressors, the VAR system is identical the the SUR system. So the Gibbs sampler of the SUR model applies here.
VAR with Varied Frequency Data (VARDAS)
The Var(ied) Da(ta) S(ampling), or VARDAS model is built upon a standard VAR model but allows data of mixed frequencies. Frequencies can vary among variables and change over time. With the VARDAS model, you can put, say, quarterly GDP and monthly CPI data in one regression. Furthermore, within a time series you can mix older data of low frequency and recent data with higher frequency. The VARDAS package is friendly to users, who only need to provide the data and the computer will do the rest as routinely as a standard VAR model. In addition, the package comes with graphic interfaces that allow loading the data from an EXCEL file and running the estimation with the mouse clicking. The VARDAS model is estimated in a Bayesian framework with block Gibbs sampler.
Users Guide to the VARDAS Package.pdf
Original Paper: Vector Autoregression with Varied Frequency Data, by Hang Qian
Bayesian Endogenous Regressors and Instruments
The Bayesian Endogenous Regressors and Instruments package includes a Matlab function which can handle endogeneity problems. Bayesian instrumental variables methods can be incorporated into the SUR framework. If the errors terms are normal, and endogenous regressors and instruments has some linear relationship, then the Bayesian inference with flat prior should be similar to the classical TSLS.
Bayesian Probit and Logit Model
The Bayesian Probit and Logit package includes a graph interface to estimate the model with MCMC. The prior of regression coefficients are set to be a flat normal distribution. The Probit model uses latent variable framework and the conditional posterior of the latent dependent variable follows a truncated normal distribution. The Logit model uses Metropolis-Hasting algorithm to sample posterior regression coefficients.
The Bayesian Tobit package includes three programs, which can estimate:
1) Baseline Tobit model with upper and lower censoring points.
2) Tobit model with unknown censoring lower bound.
3) Tobit model together with endogenous regressors.
Gibbs sampler is used to estimate these models. Conditional posteriors of latent variable follows truncated normal distribution.
Unknown censoring point has a conjugate uniform.
The endogeneity is handle with auxiliary regressions in the SUR model.
The Bayesian panel data analysis package includes a graphical user interface to estimate random effects model of two varieties. In the baseline model, the cross-sectional intercept has a conjugate normal distribution. In the positive random effects model, the cross-sectional intercept has an exponential prior, which leads to a truncated normal posterior. The second model is essentially the “rat growth hierarchical model” in Gelfand et al. (1990).
Bayesian Stochastic Search Variable Selection
The Bayesian Stochastic Search Variable Selection package includes a graphical user interface to select regressors in the linear regression model.
A user provides all the candidate regressors and the program choose the relevant regressors included in the model.
The selection algorithm follows George and McCulloch (1993).
The prior of regression coefficients have a Gaussian mixture, one with large variance and one with small variance.
If a coefficient resides on the latter, it is an indication of exclusion since the coefficient is close to zero.
This algorithm works highly satisfactorily in the simulated dataset, and I recommend its usage in empirical studies.
Bayesian Highest Posterior Density (HPD) Region
The Bayesian HPD Region package can locate the intervals of 95% probability. Once you supply the pdf, cdf, or inverse cdf of a distribution possibly with multi-modals, the program will compute HPD regions. In addition, if you provide samples (MCMC draws) from a certain distribution, the program will use the algorithm proposed by Chen and Shao (1998) to locate the HPD interval. In that case, only single-modal distribution is supported.
Bayesian Marginal Likelihood of Linear Regression Model
The Bayesian Marginal Likelihood package can compute the marginal likelihood of the data in the linear regression model of Lindley and Smith (1972) proper priors. The algorithm follows Gelfand and Dey (1994) as well as Chib (1995). The two methods yield almost identical results.
These programs were originally written by Dr. Hang Qian of Iowa State University.
Since these codes are not available on the author's website, they were reproduced here.