Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: no obs


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: no obs
Date   Thu, 12 Aug 2004 17:40:37 -0400

Justin wrote

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 issue
here? I have the data -tsset, and data is certainly in the data set. Any other
troubleshooting tips?

Additionally, in trying to run any panel unit root tests or -johans, I am told
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

. tsset
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.

Kit

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index