Statalist


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

Re: Re: Re: RE: st: Can I apply -treatreg- if the endogenous variable iscontinuous?


From   gjhxmu@sina.com
To   statalist<statalist@hsphsun2.harvard.edu>
Subject   Re: Re: Re: RE: st: Can I apply -treatreg- if the endogenous variable iscontinuous?
Date   Thu, 13 Aug 2009 20:38:28 +0800

Austin,
thank you very much for your serious help.

Best regards,
Rose.

----- Original Message -----
From: Austin Nichols <austinnichols@gmail.com>
To: statalist@hsphsun2.harvard.edu
Subject: Re: Re: RE: st: Can I apply -treatreg- if the endogenous variable iscontinuous?
Date: 2009-8-13 02:54:00

To be perfectly clear:
using -treatreg- when -ivregress- is the right approach is a bad idea. Period.

clear all
prog ftreat, rclass
syntax [,Corr(real .5) z(real .8)]
mat C=(1,0,0,0 \ 0,1,`corr',`z' \ 0,`corr',1,0 \ 0,`z',0,1 )
drawnorm x1 x2 e z, corr(C) n(1000) clear
g y=1+x1+x2+e
reg y x1 x2
ret scalar ols=_b[x2]
ivregress gmm y x1 (x2=z)
ret scalar iv=_b[x2]
su x2, d
g t=x2>r(p50)
treatreg y x1,treat(t=z)
ret scalar treat=_b[t]/normalden(0)/4
eret clear
end
simul, rep(100) seed(1):ftreat
tw kdensity ols||kdensity iv||kdensity treat, xli(1)

Even if -treatreg- is the right approach, using -ivregress- does not
cost very much:

clear all
prog ftreat2, rclass
syntax [,Corr(real .5) z(real .8)]
mat C=(1,0,0,0 \ 0,1,`corr',`z' \ 0,`corr',1,0 \ 0,`z',0,1 )
drawnorm x1 x2 e z, corr(C) n(1000) clear
g t=x2>0
g y=1+x1+t+e
reg y x1 t
ret scalar ols=_b[t]
ivregress gmm y x1 (t=z)
ret scalar iv=_b[t]
probit t z
predict that
ivregress gmm y x1 (t=that)
ret scalar ivt=_b[t]
treatreg y x1,treat(t=z)
ret scalar treat=_b[t]
eret clear
end
simul, rep(100) seed(1):ftreat2
tw kdensity ols||kdensity iv||kdensity ivt||kdensity treat, xli(1)


2009/8/12 <gjhxmu@sina.com>:
> Austin, thank you for your reply.
>
> I have ever seen this application, however I am not sure. I want to check it right or wrong. Thank you.
> An additionally doubt is,
>
> treatreg y x1dum x2,treat(x1dum=z1 z2 z3 z4)
>
> In the above typing, can it be understood as z1 z2 z3 z4 are instruments for x1dum?
>
> Thank you.
>
> Best regards,
>
> Rose.
>
>
> ----- Original Message -----
> From: Austin Nichols <austinnichols@gmail.com>
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: RE: st: Can I apply -treatreg- if the endogenous variable iscontinuous?
> Date: 2009-8-12 23:22:29
>
> No, that does not sound appropriate. Why would you want to do that?
> Is it because you have no candidates for excluded instruments and you
> are hoping to identify off nonlinearities alone? In that case, you
> would be better off in general ignoring the endogeneity problem than
> adopting such a strategy. What you should do is find excluded
> instruments and run -ivreg2- or -ivregress-.
*
* 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