* * Examples 17.6, 17.7 * 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 753 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 wage equation by OLS for those in the labor force. * linreg(smpl=inlf) lwage # educ exper expersq constant * * As first step in "heckit" procedure, estimate a probit for the "inlf" variable, * using the explanatory variables from the hours equation. * ddv(dist=probit) inlf # constant nwifeinc educ exper expersq age kidslt6 kidsge6 * * Compute the inverse Mills' ratios from this. * prj(dist=probit,mills=lambda2) * * Run OLS again, including lambda2 as an explanatory variable. * linreg(smpl=inlf) lwage # educ exper expersq constant lambda2 * * Same thing, but including all the model's exogenous variables. * linreg(smpl=inlf) lwage # constant nwifeinc educ exper expersq age kidslt6 kidsge6 lambda2 * * Example 17.7 * * Estimate labor force participation probit, replacing educ with the instruments * selected for it. Get the inverse Mills' ratios. * ddv(dist=probit) inlf # constant nwifeinc motheduc fatheduc huseduc exper expersq age kidslt6 kidsge6 prj(dist=probit,mills=lambda3) * * Estimate the wage equation by 2SLS, using all the exogenous variables, plus the * inverse Mills' ratio from the selection equation. * instruments constant nwifeinc motheduc fatheduc huseduc exper expersq age kidslt6 kidsge6 lambda3 linreg(instruments) lwage # educ exper expersq constant lambda3