Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Clive Gilbert <clivegilbert@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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 <njcoxstata@gmail.com> 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 <clivegilbert@gmail.com> 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 <maartenlbuis@gmail.com> 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: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ * * 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/

**References**:**st: Inexplicably missing values for lagged variables***From:*Clive Gilbert <clivegilbert@gmail.com>

**Re: st: Inexplicably missing values for lagged variables***From:*Maarten Buis <maartenlbuis@gmail.com>

**Re: st: Inexplicably missing values for lagged variables***From:*Clive Gilbert <clivegilbert@gmail.com>

**Re: st: Inexplicably missing values for lagged variables***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**Re: st: forecasting demographic indicators using stata** - Next by Date:
**st: new feature in xtabond2** - Previous by thread:
**Re: st: Inexplicably missing values for lagged variables** - Next by thread:
**[no subject]** - Index(es):