Statalist


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

st: Re: AW: drop command & missing values


From   "Francesco Trivieri" <francesco.trivieri@unical.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: AW: drop command & missing values
Date   Mon, 12 Oct 2009 14:16:03 +0200

Dear Martin,

thank you very much. I eventually understood the problem. It was depending on the lagged dependent variable. If I do

1) drop if x>123
rather than
2) drop if x>123 & x!=.

I am eliminating observations that Stata may use to calculate Y-1. So, I avoid the problem by using 2).

Best regards
Francesco


----- Original Message ----- From: "Martin Weiss" <martin.weiss1@gmx.de>
To: <statalist@hsphsun2.harvard.edu>
Sent: Monday, October 12, 2009 1:47 PM
Subject: st: AW: drop command & missing values



<>

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/

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