Statalist


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

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


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Re: AW: drop command & missing values
Date   Mon, 12 Oct 2009 14:17:18 +0200

<> 


Ok, cheers. As you kept talking about "x", I assumed that this was an
indepent variable in your analysis (although there is nothing to prevent you
from calling your dependent "x", other than the anger of your fellow human
beings...), and that the lag thing had nothing to do with it...


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Francesco
Trivieri
Gesendet: Montag, 12. Oktober 2009 14:16
An: [email protected]
Betreff: st: Re: AW: drop command & missing values

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" <[email protected]>
To: <[email protected]>
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: [email protected]
> [mailto:[email protected]] Im Auftrag von Francesco
> Trivieri
> Gesendet: Montag, 12. Oktober 2009 12:36
> An: [email protected]
> 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/


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