Affiliation:
1. University of Durham, UK
Abstract
Three commands in official Stata, foreach, forvalues, and for, provide structures for cycling through lists of values (variable names, numbers, arbitrary text) and repeating commands using members of those lists in turn. All these commands may be used interactively, and none is restricted to use in Stata programs. They are explained and compared in some detail with a variety of examples. In addition, a self-contained exposition is given on local macros, understanding of which is needed for use of foreach and forvalues.
Subject
Mathematics (miscellaneous)
Cited by
19 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. References;Data Science for Business and Decision Making;2019
2. Speaking Stata: Matrices as Look-Up Tables;The Stata Journal: Promoting communications on statistics and Stata;2012-12
3. Speaking Stata: Output to Order;The Stata Journal: Promoting communications on statistics and Stata;2012-03
4. Speaking Stata: Finding Variables;The Stata Journal: Promoting communications on statistics and Stata;2010-07
5. Stata Tip 85: Looping over Nonintegers;The Stata Journal: Promoting communications on statistics and Stata;2010-03