Statalist


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

st: AW: drop command & missing values


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: drop command & missing values
Date   Mon, 12 Oct 2009 13:47:24 +0200

<> 

Well, in the absence of an example that is reproducible to all it is
difficult to diagnose the problem. In my example, both approaches end up
delivering the same nobs...


*************
use http://www.stata-press.com/data/r7/abdata.dta, clear

replace w=. in 200/250

preserve
drop if w>3.4
xtabond2 n w k, iv(w k, eq(level)) small h(1)
restore

preserve
drop if w>3.4 & w!=.
xtabond2 n w k, iv(w k, eq(level)) small h(1)
restore
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Francesco
Trivieri
Gesendet: Montag, 12. Oktober 2009 12:36
An: statalist@hsphsun2.harvard.edu
Betreff: st: drop command & missing values

Dear Maarten and Martin,

thank you very much for your answers. I am always including the x variable 
in my estimation, I don't understand why:

drop if x>123
xtabond2    Y   Y_1    X    Z ....
the estimation sample is 8100

drop if x>123 & x!=.
xtabond2    Y   Y_1    X    Z ....
the estimation sample is 12200

thanks again
Francesco 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index