Adaptive Markov chain Monte Carlo sampling and estimation in Mata

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() and amcmc_*() can be used with models set up to work with Mata's moptimize() (see [M-5] moptimize()) or optimize() (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—simulationbased 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 command mcmccqreg. 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 command bayesmixedlogit.

Issue Date:
Publication Type:
Journal Article
Published in:
Stata Journal, Volume 14, Number 3
Page range:

Record appears in:

 Record created 2017-10-27, last modified 2017-10-27

Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)