* PS5.1, using DATA4-3, SHAZAM command file for Example 5.1 TIME 1963 SAMPLE 1963 1985 READ(data4-3) T HOUSING POP GNP UNEMP INTRATE * * Model A - Omission of the variable GNP. * OLS HOUSING INTRATE POP / RESID=UHAT GENR APE1=100*ABS(UHAT)/HOUSING GENR APE1=SUM(APE1)/23 * * Model B - Omission of the variable POP. * OLS HOUSING INTRATE GNP / RESID=UHAT GENR APE2=100*ABS(UHAT)/HOUSING GENR APE2=SUM(APE2)/23 * * Model C - Includes GNP and POP. * OLS HOUSING INTRATE POP GNP / ANOVA RESID=UHAT GENR APE3=100*ABS(UHAT)/HOUSING GENR APE3=SUM(APE3)/23 SAMPLE 1985 1985 PRINT APE1 APE2 APE3 SAMPLE 1963 1985 * * The GEN1 command is used to save the temporary variables, Sum of Square * Errors ($SSE) and Degrees of Freedom ($DF) from the previous regression * as a constant. * GEN1 SSE1=$SSE GEN1 DF1=$DF * * To calculate the Wald F-statistic to determine if the variables POP and * GNP are significant in the regression, we must estimate the above * OLS regression omitting the independent variables, POP and GNP. The * OLS output is not important so the "?" is used to suppress the SHAZAM * output. The GEN1 command is used to save the temporary variables, Sum * of Squared Errors ($SSE) and Degrees of Freedom ($DF) from the regression * below. * ?OLS HOUSING INTRATE GEN1 SSE2=$SSE GEN1 DF2=$DF * * Calculate and print the Wald F-statistic. * GEN1 F=((SSE2-SSE1)/(DF2-DF1))/(SSE1/DF1) PRINT F * * The pairwise correlation coefficients for GNP, POP, and INTRATE * are calculated using the PCOR option on the STAT command. Note, * these correlations are based on the coefficients. If the PCOR * option is specified on an OLS regression then SHAZAM will print * the correlation matrix of the estimated coefficients. * STAT GNP POP INTRATE / PCOR * DELETE / ALL STOP