Adaptive Markov Chain Monte Carlo Sampling and Estimation in Mata. (September 2014) - Baker, Matthew J.
I describe algorithms for drawing from distributions using adaptive Markov chain Monte Carlo (MCMC) methods; I introduce a Mata function for performing adaptive MCMC, amcmc() ; and I present a suite of functions, amcmc_ * (), that allows an alternative implementation of adaptive MCMC.amcmc() andamcmc_ * () can be used with models set up to work with Mata'smoptimize( ) (see [M-5]moptimize( ) ) oroptimize( ) (see [M-5]optimize( ) ) or with standalone functions. To show how the routines can be used in estimation problems, I give two examples of what Chernozhukov and Hong (2003, Journal of Econometrics 115: 293–346) refer to as quasi-Bayesian or Laplace-type estimators—simulation-based estimators using MCMC sampling. In the first example, I illustrate basic ideas and show how a simple linear model can be fit by simulation. In the next example, I describe simulation-based estimation of a censored quantile regression model following Powell (1986, Journal of Econometrics 32: 143–155); the discussion describes the workings of the commandmcmccqreg . I also present an example of how the routines can be used to draw from distributions without a normalizing constant and used in Bayesian estimation of a mixed logit model. This discussion introduces the commandbayesmixedlogit .