IDEAS home Printed from https://ideas.repec.org/b/tsj/spbook/isp.html
   My bibliography  Save this book

An Introduction to Stata Programming, Second Edition

Author

Listed:
  • Christopher F Baum

    (Boston College)

Abstract

Christopher F. Baum's An Introduction to Stata Programming, Second Edition, is a great reference for anyone that wants to learn Stata programming. For those learning, Baum assumes familiarity with Stata and gradually introduces more advanced programming tools. For the more advanced Stata programmer, the book introduces Stata's Mata programming language and optimization routines. This new edition of the book reflects some of the most important statistical tools added since Stata 10, when the book was introduced. Of note are factor variables and operators, the computation of marginal effects, marginal means, and predictive margins using margins, the use of gmm to implement generalized method of moments estimation, and the use of suest for seemingly unrelated estimation. As in the previous edition of the book, Baum steps the reader through the three levels of Stata programming. He starts with do-files. Do-files are powerful batch files that support loops and conditional statements and are ideal to automate your workflow as well as to guarantee reproducibility of your work. While giving examples of do-file programming, Baum introduces useful programming tips and advice. He then delves into ado-files, which are used to extend Stata by creating new commands that share the syntax and behavior of official commands. Baum gives an example of how to write a simple additional command for Stata, complete with documentation and certification. After writing the simple command, users can then learn how to write their own custom estimation commands by using both Stata's built-in numerical maximum-likelihood estimation routine, ml, its built-in nonlinear least-squares routines, nl and nlsur, and its built-in generalized method of moments estimation routine. Finally, he introduces Mata, Stata's matrix programming language. Mata programs are integrated into ado-files to build a custom estimation routine that is optimized for speed and numerical stability. While discussing Mata, Baum presents useful topics for advanced programming such as structures and pointers and likelihood-function evaluators using Mata. Baum introduces concepts by providing the background and importance for the topic, presents common uses and examples, and then concludes with larger, more applied examples he refers to as "cookbook recipes". Many of the examples in the book are of particular interest because they arose from frequently asked questions from Stata users. If you want to understand basic Stata programming or want to write your own routines and commands using advanced Stata tools, Baum's book is a great reference.

Suggested Citation

  • Christopher F Baum, 2016. "An Introduction to Stata Programming, Second Edition," Stata Press books, StataCorp LP, number isp, March.
  • Handle: RePEc:tsj:spbook:isp
    as

    Download full text from publisher

    File URL: http://www.bc.edu/sites/libraries/facpub/stataprogramming/index.html
    File Function: link to interview of author
    Download Restriction: no

    File URL: http://www.stata-press.com/data/itsp2.html
    File Function: link to downloadable datasets
    Download Restriction: no
    ---><---

    Citations

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


    Cited by:

    1. Carlos Carrion & Nebiyou Tilahun & David Levinson, 2011. "Monte Carlo Simulation of Adaptive Stated Preference Survey with a case study: Effects of Aggregate Mode Shares on Individual Mode Choice," Working Papers 000093, University of Minnesota: Nexus Research Group.
    2. Baptiste Leurent, 2018. "The Mata Book: a Book for Serious Programmers and Those Who Want To Be," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 181(4), pages 1261-1261, October.

    More about this item

    Keywords

    programming; statistical analysis; data management; graphics;
    All these keywords.

    JEL classification:

    • C1 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: 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:spbook:isp. See general information about how to correct material in RePEc.

    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.

    We have no bibliographic references for this item. You can help adding them by using 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.

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

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

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.