* * Example of wage equation beginning page 281 * open data mroz.dat data(format=free,org=columns) 1 753 taxableinc federaltax hsiblings hfathereduc hmothereduc siblings lfp $ hours kidsl6 kids618 age educ wage wage76 hhours hage heduc hwage faminc mtr mothereduc fathereduc unenployment $ largecity exper * * We want to restrict the analysis to the observations where wage>0.0. (For ones * with wage==0.0, lnwage will be undefined). * smpl(series=wage>0.0) * set expersq = exper^2 set lnwage = log(wage) * linreg lnwage # constant educ exper expersq * * First stage regression. (This isn't necessary for doing the final estimation * using RATS, but can be useful as a check on the instruments). * linreg educ # constant exper expersq mothereduc * * IV with mother's education. Note that the INSTRUMENTS instruction includes all * the explanatory variables from the reduced form regression. * instruments constant exper expersq mothereduc linreg(inst) lnwage # constant educ exper expersq * * IV with both mother's and father's education * * Reduced form regression. * linreg educ # constant exper expersq mothereduc fathereduc exclude(title="Test for Weak Instruments") # mothereduc fathereduc * * IV regression * instruments constant exper expersq mothereduc fathereduc linreg(inst) lnwage # constant educ exper expersq * * The Hausman test for exogeneity can be done using the RegWuTest procedure * immediately after the LINREG(INST). (This example of a Hausman test was earlier * described by Wu). * @regwutest * * Same test done using auxiliary regressions * linreg educ # constant exper expersq mothereduc fathereduc set vhat = %resids linreg lnwage # constant educ exper expersq vhat * * The test of overidentifying restrictions is included in the original * LINREG(INST) output as the J-statistic. This does the auxiliary regression. The * test-statistic is slightly different due to a different choice for the * denominator in the calculation. * linreg(inst) lnwage # constant educ exper expersq linreg %resids # constant exper expersq mothereduc fathereduc cdf(title="Test of overidentification") chisqr %trsquared 1