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

st: RE: creating lag variable

From   "Nick Cox" <>
To   <>
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 

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]). 


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:

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