EconPapers    
Economics at your fingertips  
 

Adaptive Markov chain Monte Carlo sampling and estimation in Mata

Matthew Baker

Stata Journal, 2014, vol. 14, issue 3, 623-661

Abstract: 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. Copyright 2014 by StataCorp LP.

Keywords: amcmc(); amcmc_*(); bayesmixedlogit; mcmccqreg; Mata; Markov chain Monte Carlo; drawing from distributions; Bayesian estimation; mixed logit (search for similar items in EconPapers)
Date: 2014
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj14-3/st0354/
References: Add references at CitEc
Citations: View citations in EconPapers (19)

Downloads: (external link)
http://www.stata-journal.com/article.html?article=st0354 link to article purchase

Related works:
Working Paper: Adaptive Markov chain Monte Carlo sampling and estimation in Mata (2014) Downloads
Working Paper: Adaptive Markov chain Monte Carlo sampling and estimation in Mata (2013) Downloads
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:14:y:2014:i:3:p:623-661

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-22
Handle: RePEc:tsj:stataj:v:14:y:2014:i:3:p:623-661