Command Reference : Programming Language Reference
  
 
to
Expression || Program Statements
Upper limit of for loop OR lag range specifier.
to is required in the specification of a FOR loop to specify the upper limit of the control variable; see “The FOR Loop”.
When used as a lag specifier, to may be used to specify a range of lags to be used in estimation.
Syntax
Used in a FOR loop:
for !i=n to m
[commands]
next
Used as a Lag specifier:
series_name(n to m)
Examples
ls cs c gdp(0 to -12)
Runs an OLS regression of CS on a constant, and the variables GDP, GDP(–1), GDP(–2), …, GDP(–11), GDP(–12).
Cross-references
See “The FOR Loop”. See also, exitloop, for, next.