Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Creating "lagged" variables
From
Ophelie Desmarais <[email protected]>
To
[email protected]
Subject
st: Creating "lagged" variables
Date
Fri, 11 Mar 2011 19:43:47 +0100
Dear Statalist,
I want create lagged variables like this. For example, lag of three
(y_t3) would be:
t y_t y_t3
1 0 0
2 1 1
3 0 1
4 0 1
5 0 1
6 0 0
I have done this in Excel before, but it would be great if you could
help me with this. I only found instructions on "standard" lags.
Your help is appreciated.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/