I am trying to run -xtreg, fe. When I do this, stata claims:-r(2000) no
observations. I also get this when I try _varlag. What could be the
here? I have the data -tsset, and data is certainly in the data set.
Additionally, in trying to run any panel unit root tests or -johans, I
my data "has gaps". What is this and how might I correct it?
Are you sure that you have tsset by both individual and time
indicators, so that tsset reports something like
panel variable: company, 1 to 10
time variable: year, 1935 to 1954
Try running xtdes and see what happens.
Gaps are not allowed in most of Stata's time series commands. That is,
you need a time series that is complete. In the above example, a
missing value in 1950 would be fatal. It may be that you have gaps in
that the data are not properly tsset, and Stata is taking the
difference between company 1, year 1954 and company 2, 1935 as a gap.
If data are tsset properly, "panel gaps" will be ignored by commands
that cannot tolerate gaps, such as those you have described above.