Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: creating lag variable


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: creating lag variable
Date   Wed, 9 Jun 2004 11:31:17 +0100

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index