Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Date: Sat, 27 Jun 2009 12:35:33 -0700


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: Date: Sat, 27 Jun 2009 12:35:33 -0700
Date   Sat, 27 Jun 2009 22:16:28 +0200

<>

Thanks for the flowers, of course! If missings are part of your everyday problems, you want to take a hard look at a new feature of Stata 11: http://www.stata.com/stata11/mi.html

HTH
Martin
_______________________
----- Original Message ----- From: "Ariel Linden, DrPH" <[email protected]>
To: <[email protected]>
Sent: Saturday, June 27, 2009 9:36 PM
Subject: st: Date: Sat, 27 Jun 2009 12:35:33 -0700


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/


*
*   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/



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