* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Chapter 10 * Note: variable names are truncated to 8 characters. READ (mroz.dat) / names STAT / ALL * Use the sample of 428 women who are in the labour force. SAMPLE 1 428 * Least squares estimation, bottom of page 407 GENR lnwage=LOG(wage) GENR exper2=exper**2 OLS lnwage educ exper exper2 * Instrumental variables estimation, bottom of page 415 * Either the 2SLS or INST command can be used for estimation. * The list of exogenous variables is enclosed in parentheses. INST lnwage educ exper exper2 (exper exper2 mothered) * Instrumental variables estimation, Equation (10.27) page 416 INST lnwage educ exper exper2 (exper exper2 mothered fathered) / RESID=EHAT * Chapter 10.4.3 Specification tests * First-stage regression - Table 10.1, page 416. OLS educ exper exper2 mothered fathered / RESID=VHAT * Hausman Test auxiliary regression - Table 10.2, page 422. OLS lnwage educ exper exper2 VHAT * Testing Instrument Validity, bottom of page 422. OLS EHAT exper exper2 mothered fathered GEN1 NR2=$N*$R2 * Calculate a p-value DISTRIB NR2 / TYPE=CHI DF=1 GEN1 pvalue=1-$CDF PRINT NR2 pvalue * Chapter 16.7.5 Tobit estimation of a labour supply function SAMPLE 1 753 * Model Estimation - Table 16.8, page 621. * Least squares estimation OLS hours educ exper age kidsl6 * Least squares, hours > 0 SET NOWARNSKIP SKIPIF (hours.le.0) OLS hours educ exper age kidsl6 DELETE SKIP$ * Tobit estimation TOBIT hours educ exper age kidsl6 / COEF=b * Recover standard errors of the REGRESSION COEFFICIENTS TEST educ/hours TEST exper/hours TEST age/hours TEST kidsl6/hours TEST constant/hours GEN1 sigma=SQRT($sig2) * The saved coefficients in b are the NORMALIZED COEFFICIENTS * The final saved coefficient is 1/sigma PRINT b * Estimate a marginal effect on observed hours of work of an * extra year of education assuming one child at home and other * variables measured at sample means (p. 620). * Save sample means in the variable xm. GENR one=1 STAT educ exper age kidsl6 one hours / MEANS=xm * One child at home. GEN1 xm:4=1 * The final coefficient is not needed GEN1 xm:6=0 MATRIX xb=xm'b GEN1 scale=NCDF(xb) GEN1 meffect=(b:1*sigma)*scale PRINT sigma scale meffect STOP