* W.H. Greene, Econometric Analysis, Fourth Edition, 2000. SAMPLE 1 20 * Table A10.1 READ (money.shd) / NAMES * Example 10.9, pp. 443-444. * Linear equation OLS Money Interest GNP / PREDICT=YHAT GEN1 LLF1=$LLF * Log transformations GENR LM=LOG(Money) GENR LR=LOG(Interest) GENR LY=LOG(GNP) * Log-linear equation OLS LM LR LY / LOGLOG RSTAT PREDICT=LYHAT * On the SHAZAM output, the LOGLOG RSTAT options report: * R-SQUARE BETWEEN ANTILOGS OBSERVED AND PREDICTED GEN1 LLF0=$LLF * The PE test for the linear model * Run the regression in Equation (10-40), p. 443 GENR AVAR=LYHAT-LOG(YHAT) OLS Money AVAR Interest GNP / COEF=BETA TRATIO=T GEN1 ALPHA=BETA:1 GEN1 PE_TEST=T:1 PRINT ALPHA PE_TEST * The PE test for the log-linear model * Run the regression in Equation (10-41), p. 443 GENR AVAR=YHAT-EXP(LYHAT) OLS LM AVAR LR LY / COEF=BETA TRATIO=T GEN1 ALPHA=BETA:1 GEN1 PE_TEST=T:1 PRINT ALPHA PE_TEST * Example 10.11 - Box-Cox Regression, pp. 451-452 * On the BOX command the RESTRICT option is used to set the * parameter restrictions that give the functional form * stated at the beginning of Example 10.11, p. 451. * The command LAMBDA Money=0 specifies that the dependent variable * will be log-transformed. BOX Money Interest GNP / ALL RESTRICT LAMBDA Money=0 END * The numerical results from the above commands can be compared * with the results reported in Table 10.7, p. 451. * Differences in estimation algorithms can explain the numerical * differences obtained. * Now allow both left- and right- hand variables to receive the * same transformation. BOX Money Interest GNP / ALL * The parameter estimates reported for the above estimation can * be compared with the estimates reported in the first column * of Table 10.8, p. 452. GEN1 LLFB=$LLF * Print the three log-likelihood values (Box-Cox model, log-linear * model and linear model) as listed on p. 453 PRINT LLFB LLF0 LLF1 * Obtain likelihood ratio test statistics SAMPLE 1 1 GEN1 LR1=-2*(LLF1-LLFB) GEN1 LR0=-2*(LLF0-LLFB) * Calculate p-values DISTRIB LR1 / TYPE=CHI DF=1 CDF=CDF GEN1 PVAL1=1-CDF DISTRIB LR0 / TYPE=CHI DF=1 CDF=CDF GEN1 PVAL0=1-CDF PRINT LR1 PVAL1 LR0 PVAL0 STOP