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

st: Re: differencing

From   Kit Baum <>
Subject   st: Re: differencing
Date   Tue, 15 Nov 2005 07:31:34 -0500

Yes. A oft-biting bug is to have observations

year y
1998 123
1999 144
2001 192
2002 201

and use y[_n-1] to refer to a lagged value. That is perfectly computable, but not what you mean for 2001; the lag and difference should be undefined. You can have gaps in time series with tsset; it is the individual commands that are used after that where issues of gaps may (or may not) arise. But the use of L. and D. is a great safety feature to ensure that any inadvertent errors in the time variable will become immediately apparent.

Kit Baum, Boston College Economics

On Nov 15, 2005, at 2:33 AM, Eric wrote:

If I understand the tsset stuff at all, that approach would force Gregor to come to terms with any date gaps & duplicate years which my approach glosses over. Is that right?
*   For searches and help try:

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