* * Example 5.3 and 5.4 * J. Wooldridge, Econometrics of Cross Section and Panel Data * * Note: The sample data files include all required data transformations. * However, in many cases we show how these data transformations would * be created in RATS from the basic data, as this is something you will * need to know how to do in practice. * 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 reduced form for educ and test exclusion of the potential instruments. * linreg educ # constant exper expersq motheduc fatheduc huseduc exclude # motheduc fatheduc huseduc * * Run 2SLS - list all instruments, including the constant * instruments constant exper expersq motheduc fatheduc huseduc linreg(instruments) lwage # constant exper expersq educ * * Example 5.4, add the kids variables to the instruments and * the regressors * instruments constant exper expersq motheduc fatheduc huseduc kidslt6 kidsge6 linreg(instruments) lwage # constant exper expersq educ kidslt6 kidsge6 * * Test the two kids variables using a Wald test * exclude # kidslt6 kidsge6 * * LM version described at the bottom of page 99. Compute the restricted 2SLS * regression and save the residuals. Because the variables being tested are in * the instrument set, the fitted values are the variables themselves. * linreg(instruments) lwage / resids # constant exper expersq educ linreg resids # kidslt6 kidsge6 cdf chisqr %trsq 2