Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Inexplicably missing values for lagged variables

From   Clive Gilbert <[email protected]>
To   [email protected]
Subject   Re: st: Inexplicably missing values for lagged variables
Date   Mon, 9 Jul 2012 18:54:16 +0100

Thank you both. I shall bear your comments in mind. Clive

On Mon, Jul 9, 2012 at 4:52 PM, Nick Cox <[email protected]> wrote:
> Length of panels has no influence whatsoever on how lags are handled.
> We can't tell you anything about your data that you don't know, but it
> could be that you have gaps in your data.
> For example, if a panel contains observations for years 2000 2002 2004
> 2006 2008 2010, and you -tsset- or -xtset- in terms of  a year
> variable, then all L. variables will be missing, as in no case is
> there an observation for the previous year.
> Irregularly spaced data or more generally gaps in the data have just
> the same effect as missing values as far as lag and other time series
> operators are concerned.
> Nick
> On Mon, Jul 9, 2012 at 4:41 PM, Clive Gilbert <[email protected]> wrote:
>> Thanks Maarten. My raw data set does not contain any missing values as
>> such, although it is unbalanced. I have considered the possibility
>> that the fact some of the panels are shorter  than the others might
>> cause the lags for the those panels to be generated differently.
>> However, if that were the case, I would expect the missing values to
>> be only among shorter panels but they aren't.
>> On Mon, Jul 9, 2012 at 3:43 PM, Maarten Buis <[email protected]> wrote:
>>> On Mon, Jul 9, 2012 at 4:22 PM, Clive Gilbert wrote:
>>>> I am working with panel data and have a number of lagged variables. I
>>>> have noticed that some individuals have missing values for certain
>>>> years whereas others do not .
>>> The first observation for each unit will be missing for lagged
>>> variables, as you would need the preceding value and the preceding
>>> value by definition is not present in the data for the first
>>> observation. If a preceding year is not present in your dataset, then
>>> that would also result in missing values.
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index