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.
Nick
n.j.cox@durham.ac.uk
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:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/