* Reference: Chapters 7 and 17 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 753 READ (MROZ.shd) inlf hours kidslt6 kidsge6 age educ wage repwage & hushrs husage huseduc huswage faminc mtr motheduc & fatheduc unem city exper nwifeinc lwage expersq SET MISSVALU=-999 SET SKIPMISS SET NOWARNMISS * Section 7.5 - The linear probability model * Equation (7.29), p. 234. * The dependent variable is a binary (or "dummy" variable). OLS inlf nwifeinc educ exper expersq age kidslt6 kidsge6 / COEF=LPM * Find the point at which past experience has no effect on the * probability of labor force participation. TEST -exper/(2*expersq) * The SHAZAM output gives the message: * ...WARNING..DEPENDENT VARIABLE IS DUMMY VARIABLE ...TRY LOGIT or PROBIT * See pp. 235-236 for a discussion of the limitations of the * linear probability model. * With binary dependent variables, an alternative estimation approach * is the logit and probit models discussed in Chapter 17 of the text. * Example 17.1 * Estimation results in Table 17.1, p. 538. LOGIT inlf nwifeinc educ exper expersq age kidslt6 kidsge6 / COEF=BETA * The SHAZAM output from LOGIT reports a number of R-square measures * (the calculations are given in the SHAZAM User's Reference Manual). * The MCFADDEN R-SQUARE is the "Pseudo R-squared" reported in the text. * Estimate the marginal effects evaluated at the sample means. * See the chapter PROBIT AND LOGIT REGRESSION in the SHAZAM User's * Reference Manual for technical documentation. SET NOOUTPUT GEN1 K=$K-1 GENR ONE=1 STAT nwifeinc educ exper expersq age kidslt6 kidsge6 ONE / MEAN=XBAR SET OUTPUT MATRIX XB=XBAR'*BETA SAMPLE 1 K GEN1 SCALE=EXP(-XB)/((1+EXP(-XB))**2) PRINT SCALE GENR LBETA=BETA*SCALE SAMPLE 1 753 PROBIT inlf nwifeinc educ exper expersq age kidslt6 kidsge6 / COEF=BETA * Estimate the marginal effects evaluated at the sample means. SET NOOUTPUT MATRIX XB=XBAR'*BETA SAMPLE 1 1 DISTRIB XB / TYPE=NORMAL PDF=fXB SET OUTPUT SAMPLE 1 K GEN1 SCALE=1/fXB PRINT fXB SCALE GENR PBETA=fXB*BETA * Compare the LPM estimates with the scaled logit and scaled probit * estimates. See the discussion on page 537 of the text. FORMAT(7(A8,1X)) READ NAMES / FORMAT BYVAR nwifeinc educ exper expersq age kidslt6 kidsge6 NAMEFMT(1X,A8,5X,3(4X,A8)) FORMAT(1X,A8,5X,3F12.5) PRINT NAMES LPM LBETA PBETA / FORMAT * Prediction exercise (see top of p. 539). SAMPLE 1 753 * Get sample averages STAT nwifeinc educ exper expersq age kidslt6 kidsge6 / MEANS=XM * expersq GEN1 XM:4=(XM:3)**2 * kidsge6 GEN1 XM:7=1 * Generate predictions for three different levels of kidslt6. SAMPLE 1 3 DO #=1,7 GENR XVAR#=XM:# ENDO * Set values for kidslt6 in XVAR6. The TIME function sets the * values 0, 1, 2. GENR XVAR6=TIME(-1) * The FC command is used for prediction FC inlf XVAR1-XVAR7 / MODEL=PROBIT COEF=BETA PREDICT=prob PRINT XVAR6 prob * Find the impact of going from zero to one small child. GEN1 ans1=prob:2-prob:1 * Find the impact of going from one to two young children. GEN1 ans2=prob:3-prob:2 PRINT ans1 ans2 SAMPLE 1 753 * Example 17.2 * Table 17.2, p. 544 OLS hours nwifeinc educ exper expersq age kidslt6 kidsge6 / COEF=betaOLS * Tobit estimation - the TOBIT command is described in the chapter * TOBIT REGRESSION in the SHAZAM User's Reference Manual. TOBIT hours nwifeinc educ exper expersq age kidslt6 kidsge6 / & INDEX=xalpha COEF=alpha * On the SHAZAM output, the Tobit estimates listed in Table 17.2 * are reported in the column labelled REGRESSION COEFFICIENT. * For the Tobit model the R-square measure is reported on the * SHAZAM output as: * SQUARED CORRELATION BETWEEN OBSERVED AND EXPECTED VALUES GEN1 sig=SQRT($SIG2) GEN1 NK=$K-2 * Compute the adjustment factors evaluated at the mean values of * the x variables. STAT xalpha / MEAN=mu SAMPLE 1 1 DISTRIB mu / TYPE=NORMAL PDF=pdf CDF=cdf GEN1 lambda=pdf/cdf GEN1 adjust=1-lambda*(mu+lambda) * Print the factors in Equations (17.23) and (17.27). PRINT adjust cdf * Get the regression coefficients SAMPLE 1 NK GENR beta=alpha*sig * Estimate the partial effects GENR tobit1=beta*adjust GENR tobit2=beta*cdf * Print the results NAMEFMT(1X,A8,5X,3(4X,A8)) FORMAT(1X,A8,5X,3F12.3) PRINT NAMES betaOLS tobit1 tobit2 / FORMAT STOP