|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: 3 equations, 2 endogenous Variables, 1 endogenous variable related to the other
From |
Jason Kuruzovich <[email protected]> |
To |
<[email protected]> |
Subject |
Re: st: 3 equations, 2 endogenous Variables, 1 endogenous variable related to the other |
Date |
Thu, 10 Dec 2009 21:17:44 -0500 |
Title: Re: st: 3 equations, 2 endogenous Variables, 1 endogenous variable related to the other
After talking to some people, I think I’ve figured it out. The code below does the estimation in several different ways and gets equivalent results.
I just thought I would post the solution in case anyone comes across the same situation.
*This example is used to demonstrate my situation.
clear
est clear
use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta
quietly reg3 (lw=s expr med iq tenure) (iq tenure = s expr med age kww ), 2sls
est store reg32sls
quietly ivreg2 lw s expr med (tenure iq=kww age), first
est store ivreg2lw
*this provides a way of testing the relationship between IQ and tenure.
quietly ivreg2 tenure s expr med ( iq=kww age), first
est store ivreg2tenure
quietly reg3 (lw=s expr med iq tenure) (iq tenure =s expr med kww age), 3sls
est store reg33sls
quietly reg iq s expr med age kww
est store firststageIQ
rename iq iq_was
predict iq
quietly reg tenure s expr med iq
est store secondtenure
quietly reg tenure s expr med age kww
est store firststagetenure
rename tenure tenure_was
predict tenure
quietly reg lw s expr med tenure iq
est store secondlw
estout *, cells(b(star fmt(3)) se(par fmt(2)))
*the methods provide equivalent results for the beta.