* W.H. Greene, Econometric Analysis, Fourth Edition, 2000. SAMPLE 1 32 * Table A19.1 READ (grade.shd) / NAMES * Example 19.1, p. 816 and Example 19.4, p. 825. * Linear OLS GRADE GPA TUCE PSI / COEF=OLSBETA * Logit Estimation LOGIT GRADE GPA TUCE PSI / COEF=LCOEF * Estimate the marginal effects evaluated at the sample means. GEN1 K=$K-1 GENR ONE=1 STAT GPA TUCE PSI ONE / MEAN=XBAR MATRIX XB=XBAR'*LCOEF SAMPLE 1 K * Equation (19-11), p. 815 GEN1 SCALE=EXP(XB)/((1+EXP(XB))**2) * Equation (19-12), p. 816 GENR LBETA=SCALE*LCOEF SAMPLE 1 32 * Probit Estimation PROBIT GRADE GPA TUCE PSI / COEF=PCOEF * Estimate the marginal effects evaluated at the sample means. MATRIX XB=XBAR'*PCOEF DISTRIB XB / TYPE=NORMAL GEN1 fXB=$PDF SAMPLE 1 K * Equation (19-10), p. 815. GENR PBETA=fXB*PCOEF * Print the slope coefficients for the models as given in * Table 19.1, p. 816. FORMAT(3A8) READ VARIABLE / FORMAT BYVAR GPA TUCE PSI NAMEFMT(1X,A8,1X,3(2X,A8)) FORMAT(1X,A8,3F10.3) PRINT VARIABLE OLSBETA LBETA PBETA / FORMAT * Example 19.2, pp. 817-818. SAMPLE 1 21 * Generate values of GPA from 2 to 4. GENR XGPA=2+TIME(-1)/10 GEN1 MTUCE=XBAR:3 * Calculate the probabilities at the bottom of p. 817. GENR PSI0=NCDF(PCOEF:1*XGPA+PCOEF:2*MTUCE+PCOEF:4) GENR PSI1=NCDF(PCOEF:1*XGPA+PCOEF:2*MTUCE+PCOEF:3+PCOEF:4) * Figure 19.2, p. 818. GRAPH PSI1 PSI0 XGPA / LINEONLY STOP