* PS4.2, using DATA4-2, to verify Examples 4.8, 4.9, and 4.10, Sec. 4.4 * Example 4.8 * * The TIME command specifies the beginning year and frequency for a time * series so that an alternate form of the SAMPLE command can be used. In * this example, the beginning year is 1959 and it is annual data. The * following SAMPLE command tells SHAZAM that the sample range begins at * 1959 and ends at 1994. * TIME 1959 1 SAMPLE 1959 1994 READ(data4-2) YEAR Ct Yt WAGES PRDEFL GENR Wt=(100*WAGES)/PRDEFL GENR Pt=Yt-Wt * * Equation 4.5 - Unrestricted Model * OLS Ct Wt Pt / ANOVA * * Save the Sum of Squared Errors from the Unrestricted Equation as a * constant, ESSU and d.f. as DFU. * GEN1 ESSU=$SSE GEN1 DFU=$DF * * Equation 4.6 - Restricted Model * OLS Ct Yt / ANOVA * * Save the Sum of Squared Errors from the Restricted Equation as a * constant, ESSR. * GEN1 ESSR=$SSE * * Calculate the Wald F-statistic as defined in Equation 4.3 on page 177. * * (k - m) = 1 as defined by Ramanathan (page 183) since there is only * one restriction. Equation 4.5 is the Unrestricted Model and it has * (n - 3) degrees of freedom. * GEN1 Fc= ((ESSR-ESSU)/1)/(ESSU/DFU) PRINT Fc DISTRIB Fc / TYPE=F DF1=1,DF2=DFU * * Example 4.9 - Indirect t-test * * Estimate Equation 4.7. * OLS Ct Yt Pt * * Example 4.10 * * The covariance of Beta2 (Wt) and Beta3 (Pt) is printed when the PCOV option * is specified on the OLS command. The estimated coefficients from the * regression are saved in the vector called COEF as this information is * required to calculate the t-statistic as defined on page 185 of the * textbook. The variance of the coefficients Beta2 (Wt) and Beta3 (Pt) is * defined as the square of the standard errors from the regression. * Therefore, save the standard error in a vector called SE. * OLS Ct Wt Pt / PCOV COEF=COEF COV=COV STDERR=SE * * The estimated regression coefficient Beta2 (Wt) and Beta3 (Pt) is generated * into a constant called BETA2 and BETA3. * GEN1 BETA2=COEF(1) GEN1 BETA3=COEF(2) * * The standard error for Beta2 (Wt) and Beta3 (Pt) is generated into a constant * called SE1 and SE2. * GEN1 SE2=SE(1) GEN1 SE3=SE(2) * * The variance of Beta2 (Wt) and Beta3 (Pt) is calculated below: * GEN1 VARB2=SE2**2 GEN1 VARB3=SE3**2 * * Print the standard error and variance for Beta2 (Wt) and Beta3 (Pt). * PRINT SE2 VARB2 SE3 VARB3 PRINT COV * * The formula for the t-statistic on page 185 of the textbook is calculated. * The value of the Covariance of Beta2 (Wt) and Beta3 (Pt) is stored in the * matrix caled COV in th element row 2, column 1. The MATRIX command is * used. * MATRIX T=(BETA2-BETA3)/(VARB2+VARB3-2*COV(2,1))**0.5 PRINT T DISTRIB T / TYPE=T DF=1 DELETE / ALL STOP