Hi Martin,
As always, you provide amazing insight. I didn't even know about the xtdes
command, but it is very useful.
I see your point about dropping the union variable, as it is a
time-dependent variable, which I hadn't thought of in this instance. You
are
right that it is better to leave the missing values in the data set when
running this code.
Thanks again, as always!
Ariel
Date: Sat, 27 Jun 2009 01:48:45 +0200
From: "Martin Weiss" <[email protected]>
Subject: st: Re: Code erroring out because of "no observations" -
revisited
The last wave of nlswork.dta is number 15. However, if you do decide to
drop
missings, that shrinks to twelve. Note that your -drop- instruction chucks
out any _individual_ missing value on union, while you may want to bear
with
a couple of missings on any panel unit. Type
***
webuse nlswork, clear
xtdes
***
to see the participation pattern.
If you want to see why you drop to 12 (not 11, not 13, either) type
***
webuse nlswork, clear
by idcode, sort : egen float nonmiss = count(union)
su nonmiss
***
BTW, even with these problems, your code runs fine for me...
HTH
Martin
*
* 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/