Cox, Nicholas J. - In: Stata Journal 2 (2002) 2, pp. 202-222
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...