* PS10.8, using DATA10-5, for Example 10.6 * TIME 1960 1 SAMPLE 1960 1994 READ(data10-5) YEAR CALWAGE USWAGE * * Generate the Time Index called T with the GENR command. * GENR T=YEAR-1959 * * Generate a new variable called LCALWAGE and LUSWAGE which is equivalent to * the variable CALWAGE and USWAGE lagged back one period. * GENR LCALWAGE=LAG(CALWAGE) GENR LUSWAGE=LAG(USWAGE) * * A change measures the difference between what the value of a good is today * relative to the value of the good yesterday. Therefore, to determine the * change in the hourly wage rate one must measure the difference in the * hourly wage rate today relative to the hourly wage rate yesterday. In * this example, the change in the hourly wage rate variable for California, * DCALWAGE, is created when the hourly wage rate variable, CALWAGE, is * subtracted from the hourly wage rate variable lagged back one period, * LCALWAGE. The same procedure is used to measure the change in the hourly * wage rate for the United States. * * The GENR command is used to generate the new variables, DCALWAGE and * DUSWAGE, which measures the difference in hourly wage rates in Calfiornia * the United States. Then the LAG function is used with the GENR command * to generate the lagged difference of DCALWAGE and DUSWAGE. * GENR DCALWAGE=CALWAGE-LCALWAGE GENR DUSWAGE=USWAGE-LUSWAGE GENR LDCALW=LAG(DCALWAGE) GENR LDUSW=LAG(DUSWAGE) * * Before the Unrestricted Model can be estimated. The sample period must * be changed from 1960 to 1961 since one observation was lost when the * variables CALWAGE and USWAGE was lagged back one period. * SAMPLE 1962 1994 * * The Unrestricted Model's Sum of Squared Errors for the United States Hourly * Wage Rate is stored in the constant called ESSUUS , Number of Observations * in the constant TUS, and the Number of Parameters/Coefficients in the * constant KUS. * OLS DUSWAGE T LUSWAGE LDUSW GEN1 ESSUUS=$SSE GEN1 TS=$N GEN1 KS=$K * * Estimate the Restricted Model for the United States and save * the Sum of Squared Erros in the constant ESSRUS using the GEN1 command. * OLS DUSWAGE LDUSW GEN1 ESSRUS=$SSE * * Calculate and print the Wald F-statistic for the * United States, FUS, using the GEN1 and DISTRIB commands. * GEN1 FUS=((ESSRUS-ESSUUS)/2)/(ESSUUS/(TS-KS)) DISTRIB FUS / TYPE=F DF1=2 DF2=29 * * The GEN1 command is used to store the Unrestricted Model's Sum of Squared * Errors for California's Hourly Wage Rate in the constant called ESSUC, * Number of Observations in the constant TC, and the Number of Parameters/ * Coefficients in the constant KC. * OLS DCALWAGE T LCALWAGE LDCALW GEN1 ESSUC=$SSE GEN1 TC=$N GEN1 KC=$K * * Estimate the Restricted Model for California and save * the Sum of Squared Erros in the constant ESSRC using the GEN1 command. * OLS DCALWAGE LDCALW GEN1 ESSRC=$SSE * * Calculate and print the Wald F-statistic for California, FACL, and the * using the GEN1 and DISTRIB commands. * GEN1 FCAL=((ESSRC-ESSUC)/2)/(ESSUC/(TC-KC)) DISTRIB FCAL / TYPE=F DF1=2 DF2=29 * * The SAMPLE command is used to restore the original sample range of 1960 * to 1994. The residuals from the regression are stored in the vector, UT. * SAMPLE 1960 1994 OLS CALWAGE USWAGE / RESID=UT * * Before the Dickey-Fuller regression with a fourth-order lag process can * be applied the residuals must be generated as follows: * * Lag the residuals, UT, back one time period. * GENR UT1=LAG(UT) * * The difference in the residuals is generated by subtracting the residual * from the previous time period from the current time period. * GENR DUT=UT-UT1 * * The lagged difference in residuals is lagged one, two, three, and four * time periods below. * GENR CUT1=LAG(DUT) GENR CUT2=LAG(DUT,2) GENR CUT3=LAG(DUT,3) GENR CUT4=LAG(DUT,4) * * The SAMPLE command is used to change the sample range beginning at 1960 * to 1965 since 4 observations were lost when the variable DUT was lagged * back 4 time periods. The NOCONSTANT option is specified to suppress * the constant/intercept from being printed out in the output. * SAMPLE 1965 1994 OLS DUT UT1 CUT1 CUT2 CUT3 CUT4 / NOCONSTANT * DELETE / ALL STOP