I describe algorithms for drawing from distributions using adaptive Markov chain Monte Carlo (MCMC) methods, introduce a Mata function for performing adaptive MCMC, amcmc(), and a suite of functions amcmc *() allowing an alternative implementation of adaptive MCMC. amcmc() and amcmc *() may be used in conjunction with models set up to work with Mata's [M-5] moptimize( ) or [M-5] optimize( ), or with stand-alone functions. To show how the routines might be used in estimation problems, I give two examples of what Chernozukov and Hong (2003) refer to as Quasi-Bayesian or Laplace-Type estimators - simulation-based estimators employing MCMC sampling. In the first example I illustrate basic ideas and show how a simple linear model can be estimated by simulation. In the next example, I describe simulation-based estimation of a censored quantile regression model following Powell (1986); the discussion describes the workings of the Stata command mcmccqreg. I also present an example of how the routines can be used to draw from distributions without a normalizing constant, and in Bayesian estimation of a mixed logit model. This discussion introduces the Stata command bayesmlogit.
This paper is Working Paper 3 in the Working Paper Series of the Ph.D. Program in Economics at the Graduate Center, CUNY. It is also available via RePEc: https://ideas.repec.org/p/cgc/wpaper/003.html.