A little bit of Stata programming goes a long way..
AbstractThis tutorial will discuss a number of elementary Stata programming constructs and discuss how they may be used to automate and robustify common data manipulation, estimation and graphics tasks. Those used to the syntax of other statistical packages or programming languages must adopt a different mindset when working with Stata to take full advantage of its capabilities. Some of Stata's most useful commands for handling repetitive tasks: -forvalues-, -foreach-, -egen-, -local- and -matrix- are commonly underutilized by users unacquainted with their power and ease of use. While relatively few users may develop ado-files for circulation to the user community, nearly all will benefit from learning the rudiments of use of the -program-, -syntax- and -return- statements when they are faced with the need to perform repetitive analyses. Worked examples making use of these commands will be presented and discussed in the tutorial.
Download InfoIf you experience problems downloading a file, check if you have the proper application to view it first. In case of further problems read the IDEAS help page. Note that these files are not on the IDEAS site. Please be patient as the files may be large.
Bibliographic InfoPaper provided by Boston College Department of Economics in its series Boston College Working Papers in Economics with number 612.
Date of creation: 08 Jun 2005
Date of revision:
Contact details of provider:
Postal: Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA
Web page: http://fmwww.bc.edu/EC/
More information through EDIRC
Stata; macros; foreach; forvalues; egen; matrix; program; syntax; return;
Other versions of this item:
- Christopher F. Baum, 2005. "A little bit of Stata programming goes a long way..," United Kingdom Stata Users' Group Meetings 2005 16, Stata Users Group, revised 08 Jun 2005.
- C22 - Mathematical and Quantitative Methods - - Single Equation Models; Single Variables - - - Time-Series Models; Dynamic Quantile Regressions; Dynamic Treatment Effect Models &bull Diffusion Processes
- C87 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Econometric Software
This paper has been announced in the following NEP Reports:
- NEP-ALL-2005-06-14 (All new papers)
Please report citation or reference errors to , or , if you are the registered author of the cited work, log in to your RePEc Author Service profile, click on "citations" and make appropriate adjustments.:
- Ian Watson, 2005. "Further processing of estimation results: Basic programming with matrices," Stata Journal, StataCorp LP, vol. 5(1), pages 83-91, March.
- Nicholas J. Cox, 2001. "Speaking Stata: How to repeat yourself without going mad," Stata Journal, StataCorp LP, vol. 1(1), pages 86-97, November.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F Baum).
If references are entirely missing, you can add them using this form.