In addition to other suggestions, this
raises the question of how you are
searching.
A literal
. search lag function
does point to several sources on information.
However, as Kit Baum pointed out if your
data are time series then using -tsset- is
preferable to subscripting (e.g. using [_n-1]).
Nick
[email protected]
sarah smith
> I am trying to create a lag variable
>
> y(t) = x(t-1)
>
> I searched for a lag function but could not find. Any suggestions?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/