Page 1 of 1

about the 2sls estimates

Posted: Mon Dec 17, 2012 7:02 pm
by tony
I estimate a model using 2sls in EViews 7,
but the outputs are different from my manual two stages OLS, namely
first, regress y2 on c x1 z1 z2, where y2 are endogenous, x1 are exogenous, z1,z2 are IVs, and predict y2, say y2_p
second, regress y1 on c x1 y2_p.
I konw the standard error is wrong, but the estimates should be the same as those of 2sls in EViews.
So, could you please help me to interpret this?
Thank you!

Re: about the 2sls estimates

Posted: Tue Dec 18, 2012 7:42 am
by startz
Perhaps you should post each of your regressions and the 2sls output.

Re: about the 2sls estimates

Posted: Tue Dec 18, 2012 9:01 am
by EViews Gareth
Here's some code I wrote a long time ago that replicates various 2SLS models.

Code: Select all

create u 100 series x=nrnd series y=nrnd series z=nrnd series w=nrnd 'simple 2SLS equation eq2sls.tsls y x @ z equation eq1.ls x z c eq1.fit xf equation eq2.ls y xf 'simple 2SLS with an AR(1) term equation areq2sls.tsls y x ar(1) @ z equation areq1.ls x c x(-1) y(-1) z areq1.fit xf equation areq2.ls y=c(1)*(xf-c(2)*x(-1)) + c(2)*y(-1) 'Simple 2SLS with a difference term equation difeq2sls.tsls d(y) x @ d(z) equation difeq1.ls x c d(z) difeq1.fit xf equation difeq2.ls d(y) xf 'Simple 2SLS with even more difference terms equation compeq2sls.tsls d(y) d(x) w @ d(z) c equation compeq1a.ls d(x) d(z) c compeq1a.fit(d) xf equation compeq1b.ls w d(z) c compeq1b.fit wf equation compeq2.ls d(y) xf wf