A little bit of Stata programming goes a long way
Christopher Baum
No 612, Boston College Working Papers in Economics from Boston College Department of Economics
Abstract:
This 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.
Keywords: Stata; macros; foreach; forvalues; egen; matrix; program; syntax; return (search for similar items in EconPapers)
JEL-codes: C22 C87 (search for similar items in EconPapers)
Date: 2005-06-08
References: View references in EconPapers View complete reference list from CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/EC-P/wp612.pdf main text (application/pdf)
Related works:
Working Paper: A little bit of Stata programming goes a long way (2005) 
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:boc:bocoec:612
Access Statistics for this paper
More papers in Boston College Working Papers in Economics from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().