Ask the two raw equation of 2SLS

Econometrics questions and discussions

Ask the two raw equation of 2SLS

Unread postby Frank » Thu Jul 02, 2020 10:53 am

Hi Tom,

I check the code from 10.0 version as follow
I'm confused about the 2 step Least Squares in the codes:

instruments constant ind ed union fem
linreg(inst) wks
# constant lwage ed union fem

would you please show me the first and the second regression equations?
And I'm confused about which one is the endogenous variable here?
Thank you.

Frank






Code: Select all
* Greene, Econometric Analysis, 7th Edition Example 8.2 from pp 228
*
open data tablef8-1.csv
calendar(panelobs=7,a) 1976
data(format=prn,org=columns) 1//1976:01 595//1982:01 exper wks occ ind $
  south smsa ms fem union ed blk lwage
*
set expersq = exper^2
table
linreg wks
# constant lwage ed union fem
*
* Instruments are set using the INSTRUMENTS instruction. Then you add
* the INST option to LINREG to get the IV estimates.

instruments constant ind ed union fem
linreg(inst) wks
# constant lwage ed union fem
*
instruments constant ind ed union fem smsa
linreg(inst) wks
# constant lwage ed union fem
Frank
 
Posts: 15
Joined: Fri Jun 11, 2010 7:18 am

Re: Ask the two raw equation of 2SLS

Unread postby TomDoan » Thu Jul 02, 2020 11:16 am

It isn't actually done by two stages, since that doesn't generalize to other GMM variants. The calculation is done with (23) in

https://estima.com/docs/RATS%2010%20Use ... df#page=66

Anything in the regressor list which is not in the instruments list is being treated as endogenous, so in this case, just LWAGE.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Ask the two raw equation of 2SLS

Unread postby Frank » Thu Jul 02, 2020 12:40 pm

so, in the codes:

instruments constant ind ed union fem
linreg(inst) wks
# constant lwage ed union fem

lwage is not in the list of instruments, thus it's an endogenous variable, right ?

I thought that the first step is doing :

lwang= b0 + b1 ind + b2 ed + b3 union + b4 fem

and the second step is

wks= a0 + a1 E(lwage) + a2 ed + a3 union + a4 fem


is it correct?
Frank
 
Posts: 15
Joined: Fri Jun 11, 2010 7:18 am

Re: Ask the two raw equation of 2SLS

Unread postby TomDoan » Thu Jul 02, 2020 2:19 pm

That would give you the same "A" coefficients as LINREG. (Not the same standard errors and summary statistics since those are computed using the residuals with the actual LWAGE in place of the fitted values). However, it makes a lot more sense to try to understand this from the moment conditions as described in the manual.

If you're interested in the details of 2SLS done as two separate steps, you need to look at a lower-end textbook. If you look up First Stage Regression in Find in Files, there are examples in Wooldridge Introduction, and Stock and Watson's Introduction (and a few others).
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Ask the two raw equation of 2SLS

Unread postby Frank » Thu Jul 02, 2020 10:11 pm

Thank you for your help.

I still have some questions as the code:

* INSTRUMENT.RPF
* Example of estimation using two-stage least squares.
* RATS User's Guide, example from Section 2.5.
* Based on example 9.5 from Wooldridge(2010), "Econometrics of Cross
* Section and Panel Data", 2nd ed.
*
open data mroz.raw
data(format=free,org=columns) 1 428 inlf hours kidslt6 kidsge6 $
age educ wage repwage hushrs husage huseduc huswage faminc mtr $
motheduc fatheduc unem city exper nwifeinc lwage expersq
*
set lwage = log(wage)
set expersq = exper^2
*
* Estimate the labor supply function by OLS
linreg hours
# constant lwage educ age kidslt6 kidsge6 nwifeinc
*
* Now by 2SLS
*
instruments constant educ age kidslt6 kidsge6 nwifeinc exper expersq
linreg(instruments) hours
# constant lwage educ age kidslt6 kidsge6 nwifeinc


if I fixed the codes in last three lines as taking two variables away: exper expersq as:

instruments constant educ age kidslt6 kidsge6 nwifeinc
linreg(instruments) hours
# constant lwage educ age kidslt6 kidsge6 nwifeinc[/color]

it showed that "## REG9. Model is Underidentified - 7 Parameters To Estimate and Only 6 Instruments"

I have no idea what the problem is. It's similar to original codes but I move two exogenous from INSTRUMENTS.
The lwage is still the endogenous in the code, wondering why it didn't work?
Frank
 
Posts: 15
Joined: Fri Jun 11, 2010 7:18 am

Re: Ask the two raw equation of 2SLS

Unread postby TomDoan » Fri Jul 03, 2020 7:54 am

That's to be expected---if you have any endogenous variables, you need at least one extra exogenous variable (one that's not in the model itself) for each. With this model, it's the presence of the EXPER and EXPERSQ variables (at least one of them---with two, the model is overidentified) that allow you to estimate the model. The simple counting rule (which your revised model fails) is that the number of variables on the INSTRUMENTS list has to be at least as large as the list of explanatory variables on the LINREG.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm


Return to General Econometrics

Who is online

Users browsing this forum: No registered users and 1 guest

cron