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]

st: RE: Using lagged variables in panel data analysis

From   Nick Cox <>
To   "''" <>
Subject   st: RE: Using lagged variables in panel data analysis
Date   Tue, 17 Jan 2012 16:11:34 +0000

It is usually better to create lagged variables with panel data using -tsset- or -xtset- followed by L. 

You will always have the problem that there is no value before the first. 

-drop-ping the first in each panel just makes your plight worse by throwing away some of your data. It can't solve this problem. 

On the whole, you need do nothing here: Stata's time series and panel commands do what they can with missing values, which usually means ignoring them. 


Edward James

I have a question for conducting a panel data analysis.

I make some lagged variables using "x[_n-1]" commands from 1980 to
2007 and want to conduct GLS.

When I make lagged variables, is the case of the first period supposed
to be "."? But it has a unknown value as you can see below.

	country   year   cpiannual   lcpiann~l
197.	Germany   1980    5.441055    1.488074
198.	Germany   1981    6.344242    5.441055
199.	Germany   1982    5.241046    6.344242
200.	Germany   1983    3.293413    5.241046
201.	Germany   1984    2.405797    3.293413

In this case, should I drop the case of 1980?

*   For searches and help try:

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