Statalist


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

st: RE: Re: AW: drop command & missing values


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: AW: drop command & missing values
Date   Mon, 12 Oct 2009 13:20:06 +0100

Unless memory is limited, you can avoid confusions like this by not
using -drop- at all. Just let Stata determine what to omit. 

Nick 
n.j.cox@durham.ac.uk 

Francesco Trivieri

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

From: "Martin Weiss" <martin.weiss1@gmx.de>

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

> 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

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