Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: AW: Instrument variable


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: AW: Instrument variable
Date   Mon, 9 Aug 2010 12:11:09 -0400

Martin Weiss <[email protected]> and Bin Dong:
You have to have instruments for each endog var.
Generally, the endog vars will be correlated with each other, and
instrumenting for one may get you nowhere:

clear*
set seed 123
mat c=(1,.3,.8,0,.5\.3,1,0,-.8,.5\.8,0,1,0,0\0,-.8,0,1,0\.5,.5,0,0,1)
drawnorm x1 x2 instr1 instr2 error, corr(c) n(10000) clear
la var x1 "Endogenous Regressor 1"
la var x2 "Endogenous Regressor 2"
la var instr1 "Instrument 1"
la var instr2 "Instrument 2"
la var error "Error"
g x3=rnormal()
la var x3 "Exogenous Regressor"
gen y=2+2*x1-x2+1.5*x3+error
reg y x?
est store OLS
ivregress 2sls y x3 (x1 x2 = instr1 instr2)
est store corriv
ivregress 2sls y x2 x3 (x1 = instr1 instr2)
est store onlyone
ivregress 2sls y x1 x3 (x2 = instr1 instr2)
est store onlytwo
di "Correct DGP: " in r "y=2+2*x1-x2+1.5*x3+error"
est table OLS corriv onlyone onlytwo, label


On Fri, Aug 6, 2010 at 7:32 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> You can experiment with this code:
>
> *************
> clear*
> set obs 10000
> mat in correls =  /*
> */ (1,0,.8,0,.5\0,1,0,-.6,.3\.8,0,1,0,0\0,-.6,0,1,0\.5,.3,0,0,1)
>
> //x1, x2 endogenous, instr1, instr2 as valid instruments
> drawnorm x1 x2 instr1 instr2 error, /*
> */ corr(correls) cstorage(full) clear
>
> la var x1 "Endogenous Regressor 1"
> la var x2 "Endogenous Regressor 2"
> la var instr1 "Instrument 1"
> la var instr2 "Instrument 2"
> la var error "Error"
>
> //exogenous regressor x3
> gen x3=rnormal()
> la var x3 "Exogenous Regressor"
>
> //see correlation matrix
> corr
>
> //DGP
> gen y=2+2*x1-x2+1.5*x3+error
>
> //regression assuming exogeneity
> reg y x?
> est store OLS
>
> //(correct) IV regression
> ivregress 2sls y x3 (x1 x2 = instr1 instr2)
> est store corriv
>
> //instrument just one endogenous regressor (x1)?
> ivregress 2sls y x2 x3 (x1 = instr1 instr2)
> est store onlyone
>
> //or the other one (x2)?
> ivregress 2sls y x1 x3 (x2 = instr1 instr2)
> est store onlytwo
>
> //let`s compare results
> di "Correct DGP: " in r "y=2+2*x1-x2+1.5*x3+error"
> est table OLS corriv onlyone onlytwo, label
> *************
>
> As you can see, you get the correct result for the covariate that you do
> instrument, and the incorrect one for the one where you do not...
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Bin Dong
> Gesendet: Freitag, 6. August 2010 12:14
> An: [email protected]
> Betreff: st: Instrument variable
>
> Dear all,
>
> If there are three endogenous variables in one model, do I need to
> instrument all of them  at once? Or can I just instrument one of the
> endogenous variables? Thanks
>
> Cheers,
> Bin

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index