IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v14y2014i3p623-661.html
   My bibliography  Save this article

Adaptive Markov chain Monte Carlo sampling and estimation in Mata

Author

Listed:
  • Matthew J. Baker

    () (Hunter College and the Graduate Center, CUNY)

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.

Suggested Citation

  • Matthew J. Baker, 2014. "Adaptive Markov chain Monte Carlo sampling and estimation in Mata," Stata Journal, StataCorp LP, vol. 14(3), pages 623-661, September.
  • Handle: RePEc:tsj:stataj:v:14:y:2014:i:3:p:623-661
    Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj14-3/st0354/
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=st0354
    File Function: link to article purchase
    Download Restriction: no

    Other versions of this item:

    References listed on IDEAS

    as
    1. Train,Kenneth E., 2009. "Discrete Choice Methods with Simulation," Cambridge Books, Cambridge University Press, number 9780521766555, December.
    2. Arne Risa Hole, 2007. "Fitting mixed logit models by using maximum simulated likelihood," Stata Journal, StataCorp LP, vol. 7(3), pages 388-401, September.
    3. Chernozhukov, Victor & Hong, Han, 2003. "An MCMC approach to classical estimation," Journal of Econometrics, Elsevier, vol. 115(2), pages 293-346, August.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Erik Figueiredo & Luiz Renato Lima & Gianluca Orefice, 2016. "Migration and Regional Trade Agreements: A (New) Gravity Estimation," Review of International Economics, Wiley Blackwell, vol. 24(1), pages 99-125, February.
    2. Andrew Myburgh & Jordi Paniagua, 2016. "Does International Commercial Arbitration Promote Foreign Direct Investment?," Journal of Law and Economics, University of Chicago Press, vol. 59(3), pages 597-627.
    3. Cuadros, Ana & Martín-Montaner, Joan & Paniagua, Jordi, 2019. "Migration and FDI: The role of job skills," International Review of Economics & Finance, Elsevier, vol. 59(C), pages 318-332.
    4. Valizadeh, Pourya & Smith, Travis A., 2017. "How Did the American Recovery and Reinvestment Act (ARRA) Impact the Material Well-being of SNAP Participants? A Distributional Approach," 2017 Annual Meeting, July 30-August 1, Chicago, Illinois 258496, Agricultural and Applied Economics Association.
    5. Pourya Valizadeh & Travis A Smith, 2020. "How Did The American Recovery and Reinvestment Act Affect the Material Well‐Being of SNAP Participants? A Distributional Approach," Applied Economic Perspectives and Policy, John Wiley & Sons, vol. 42(3), pages 455-476, September.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Yamada, Katsunori & Sato, Masayuki, 2013. "Another avenue for anatomy of income comparisons: Evidence from hypothetical choice experiments," Journal of Economic Behavior & Organization, Elsevier, vol. 89(C), pages 35-57.
    2. Grzybowski, Lukasz & Hasbi, Maude & Liang, Julienne, 2018. "Transition from copper to fiber broadband: The role of connection speed and switching costs," Information Economics and Policy, Elsevier, vol. 42(C), pages 1-10.
    3. Kazunari TSUKADA & Takayuki HIGASHIKATA & Kazushi TAKAHASHI, 2010. "Microfinance Penetration And Its Influence On Credit Choice In Indonesia: Evidence From A Household Panel Survey," The Developing Economies, Institute of Developing Economies, vol. 48(1), pages 102-127, March.
    4. Jeffrey E. Harris & Beatriz G. López-Valcárcel & Patricia Barber & Vicente Ortún, 2014. "Efficiency versus Equity in the Allocation of Medical Specialty Training Positions in Spain: A Health Policy Simulation Based on a Discrete Choice Model," NBER Working Papers 19896, National Bureau of Economic Research, Inc.
    5. Peng, Marcus & Oleson, Kirsten L.L., 2017. "Beach Recreationalists' Willingness to Pay and Economic Implications of Coastal Water Quality Problems in Hawaii," Ecological Economics, Elsevier, vol. 136(C), pages 41-52.
    6. Tensay Meles & L. (Lisa B.) Ryan & Sanghamitra Mukherjee, 2019. "Preferences for Renewable Home Heating: A Choice Experiment Study of Heat Pump System in Ireland," Open Access publications 10197/11467, School of Economics, University College Dublin.
    7. Flannery, Darragh & O’Donoghue, Cathal, 2013. "The demand for higher education: A static structural approach accounting for individual heterogeneity and nesting patterns," Economics of Education Review, Elsevier, vol. 34(C), pages 243-257.
    8. Carlos Barros, 2012. "Sustainable Tourism in Inhambane-Mozambique," CEsA Working Papers 105, CEsA - Center for African and Development Studies.
    9. Martin Achtnicht & Daniel Osberghaus, 2019. "The Demand for Index‐Based Flood Insurance in a High‐Income Country," German Economic Review, Verein für Socialpolitik, vol. 20(2), pages 217-242, May.
    10. Timothy J. Richards & Gordon J. Klein & Celine Bonnet & Zohra Bouamra-Mechemache, 2020. "Strategic Obfuscation and Retail Pricing," Review of Industrial Organization, Springer;The Industrial Organization Society, vol. 57(4), pages 859-889, December.
    11. Arne Hole & Julie Kolstad, 2012. "Mixed logit estimation of willingness to pay distributions: a comparison of models in preference and WTP space using data from a health-related choice experiment," Empirical Economics, Springer, vol. 42(2), pages 445-469, April.
    12. Feil, J.-H. & Anastassiadis, F. & Mußhoff, O. & Schilling, P., 2015. "Analysing Farmers’ Use of Price Hedging Instruments: An Experimental Approach," Proceedings “Schriften der Gesellschaft für Wirtschafts- und Sozialwissenschaften des Landbaues e.V.”, German Association of Agricultural Economists (GEWISOLA), vol. 50, March.
    13. Gustavo Alberto Zambrano, 2016. "El transporte modal de carga fluvial: Un estudio de la reactivación del río Magdalena," Revista Economía y Región, Universidad Tecnológica de Bolívar, vol. 10(2), pages 183-217, December.
    14. Tuomo Suhonen, 2012. "The role of distances and parents’ educational background in university field of study choice," ERSA conference papers ersa12p751, European Regional Science Association.
    15. Johannes Geyer & Thorben Korfhage, 2015. "Long‐term Care Insurance and Carers' Labor Supply – A Structural Model," Health Economics, John Wiley & Sons, Ltd., vol. 24(9), pages 1178-1191, September.
    16. Daniele Pacifico, 2012. "Fitting nonparametric mixed logit models via expectation-maximization algorithm," Stata Journal, StataCorp LP, vol. 12(2), pages 284-298, June.
    17. Rudolph, Christian, 2016. "How may incentives for electric cars affect purchase decisions?," Transport Policy, Elsevier, vol. 52(C), pages 113-120.
    18. Blake, Miranda R. & Lancsar, Emily & Peeters, Anna & Backholer, Kathryn, 2019. "Sugar-sweetened beverage price elasticities in a hypothetical convenience store," Social Science & Medicine, Elsevier, vol. 225(C), pages 98-107.
    19. Shyamal Chowdhury & J. V. Meenakshi & Keith I. Tomlins & Constance Owori, 2010. "Are Consumers in Developing Countries Willing to Pay More for Micronutrient-Dense Biofortified Foods? Evidence from a Field Experiment in Uganda," American Journal of Agricultural Economics, Agricultural and Applied Economics Association, vol. 93(1), pages 83-97.
    20. Cranford, Matthew & Mourato, Susana, 2014. "Credit-Based Payments for Ecosystem Services: Evidence from a Choice Experiment in Ecuador," World Development, Elsevier, vol. 64(C), pages 503-520.

    More about this item

    Keywords

    amcmc(); amcmc_*(); bayesmixedlogit; mcmccqreg; Mata; Markov chain Monte Carlo; drawing from distributions; Bayesian estimation; mixed logit;

    JEL classification:

    • C11 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Bayesian Analysis: General
    • C13 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Estimation: General
    • C15 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Statistical Simulation Methods: General
    • C18 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Methodolical Issues: General

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:14:y:2014:i:3:p:623-661. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F. Baum) or (Lisa Gilmore). General contact details of provider: http://www.stata-journal.com/ .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.