Page 1 of 1

Sytanx for 2SLS

Posted: Thu Oct 22, 2015 11:48 am
by diggetybo
Hello,

I'm looking to use code to run a 2SLS estimate. For example:

OLS is easy enough

Code: Select all

equation eq01.ls y c x
How does eviews code look for the 2sls? I'm guessing there is an entry for the instruments. Let's suppose I have two instruments (in addition to the right hand variable x) callthem, iv1, and iv2. How would this look in eviews code? From there I should be able to figure out the rest by myself.

Thank you

Re: Sytanx for 2SLS

Posted: Thu Oct 22, 2015 11:53 am
by EViews Gareth
Perform the estimation you want interactively using the dialogs, then (if using EViews 9), look at the Capture Window to view the code version, or (for all versions), open the equation, click on View->Representations to find out the command line form.

Re: Sytanx for 2SLS

Posted: Thu Oct 22, 2015 11:58 am
by diggetybo
ohhhh brilliant,

That saves me all kinds of trouble.

So according to the command capture log, it looks like this (if x1 is endogenous):

Code: Select all

equation eq02.tsls y c x1 x2 @ x2 iv1 iv2
Thank you again.

Re: Sytanx for 2SLS

Posted: Thu Oct 22, 2015 2:10 pm
by EViews Glenn
Note that C is added as an instrument automatically unless you explicitly tell EViews to leave it out.