Seasonal Dummy VariablesSeasonally adjusted time series are obtained by removing the seasonal component from the data. Statistical agencies may implement a seasonal adjustment procedure and report the deseaonalized time series. Another method for removing the seasonal factor is by the use of dummy variables. A matrix of seasonal dummy variables can be created with the command:
where For example, with quarterly data, seasonal dummy variables may be defined as follows.
The data matrix has the form:
Warning: The ExampleThis example is discussed in Section 15.10 of Gujarati [1995, pp. 517-519].
The data set is quarterly seasonally unadjusted data on
profits and sales for U.S. manufacturing corporations.
The SHAZAM commands
(filename:
After the After estimation it may be of interest to test the various
seasonal effects for statistical significance.
The commands above show the use of The SHAZAM output can be viewed. The estimated regression equation (with t-ratios in parentheses) is: Profits = 6688 + 1323 QD2 - 218 QD3 + 184 QD4 + 0.038 Sales + ê (3.91) (2.07) (-0.34) (0.28) (3.33) The t-ratios give statistics for separately testing that each coefficient is equal to 0. The results show that the coefficients on the dummy variables for quarters 3 and 4 are not significantly different from 0. However, there is evidence that the coefficient on the dummy variable for quarter 2 is significantly greater than 0. Testing a number of single hypotheses is not equivalent to a joint hypothesis test. A test of the joint hypothesis that all coefficients on the 3 quarterly seasonal dummy variables are equal to 0 has an F-test statistic of 2.38. This can be compared with a critical value from the F-distribution with (3,19) degrees of freedom. The SHAZAM output reports a p-value of 0.102. Therefore, at a 5% significance level we do not reject the null hypothesis, but at a 10% significance level there is some evidence to reject the null hypothesis of no seasonal effects. Since there is some evidence for increased profits in the second quarter, relative to the other quarters, a restricted regression can be estimated using just a second quarter seasonal dummy. The following SHAZAM estimation command can be inserted into the above program to get the restricted OLS estimation results:
The SHAZAM estimation results can be viewed. Avoid the Dummy Variable TrapAlternative schemes can be used to allocate the dummy variables. For example, instead of excluding the first quarter dummy variable, the above application could have excluded the fourth quarter dummy variable. Another way of proceeding is to include dummy variables for all four quarters. If this method is used then the intercept must be dropped from the regression equation to avoid the dummy variable trap. The next SHAZAM commands show model estimation with 4 quarterly
seasonal dummy variables. The OLS regression includes the matrix of
seasonal dummies
The SHAZAM estimation results can be viewed. The estimated regression equation (with t-ratios in parentheses) is: Profits = 6688 QD1 + 8011 QD2 + 6471 QD3 + 6872 QD4 + 0.038 Sales + ê (3.91) (4.38) (3.62) (3.63) (3.33) ![]() SHAZAM output|_TIME 1965 4 |_SAMPLE 1965.1 1970.4 |_READ (PROFITS.txt) PERIOD PROFITS SALES UNIT 88 IS NOW ASSIGNED TO: PROFITS.txt 3 VARIABLES AND 24 OBSERVATIONS STARTING AT OBS 1 |_GEN1 N=$N ..NOTE..CURRENT VALUE OF $N = 24.000 |_* Create seasonal dummy variables |_MATRIX QD=SEAS(N,4) |_GENR QD2=QD:2 |_GENR QD3=QD:3 |_GENR QD4=QD:4 |_* Estimation with seasonal dummy variables (Gujarati, Equation (15.10.2)) |_OLS PROFITS QD2 QD3 QD4 SALES OLS ESTIMATION 24 OBSERVATIONS DEPENDENT VARIABLE = PROFITS ...NOTE..SAMPLE RANGE SET TO: 1, 24 R-SQUARE = 0.5255 R-SQUARE ADJUSTED = 0.4256 VARIANCE OF THE ESTIMATE-SIGMA**2 = 0.11800E+07 STANDARD ERROR OF THE ESTIMATE-SIGMA = 1086.3 SUM OF SQUARED ERRORS-SSE= 0.22420E+08 MEAN OF DEPENDENT VARIABLE = 12839. LOG OF THE LIKELIHOOD FUNCTION = -199.023 VARIABLE ESTIMATED STANDARD T-RATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 19 DF P-VALUE CORR. COEFFICIENT AT MEANS QD2 1322.9 638.5 2.072 0.052 0.429 0.4083 0.0258 QD3 -217.81 632.3 -0.3445 0.734-0.079 -0.0672 -0.0042 QD4 183.86 654.3 0.2810 0.782 0.064 0.0567 0.0036 SALES 0.38246E-01 0.1148E-01 3.331 0.004 0.607 0.5503 0.4539 CONSTANT 6688.4 1711. 3.908 0.001 0.668 0.0000 0.5210 |_* Test for the significance of seasonal factors |_TEST |_ TEST QD2=0 |_ TEST QD3=0 |_ TEST QD4=0 |_END F STATISTIC = 2.3796491 WITH 3 AND 19 D.F. P-VALUE= 0.10171 WALD CHI-SQUARE STATISTIC = 7.1389474 WITH 3 D.F. P-VALUE= 0.06760 UPPER BOUND ON P-VALUE BY CHEBYCHEV INEQUALITY = 0.42023 |_STOP
SHAZAM output|_* Restricted Estimation (Gujarati, Equation (15.10.3)) |_OLS PROFITS QD2 SALES OLS ESTIMATION 24 OBSERVATIONS DEPENDENT VARIABLE = PROFITS ...NOTE..SAMPLE RANGE SET TO: 1, 24 R-SQUARE = .5155 R-SQUARE ADJUSTED = .4693 VARIANCE OF THE ESTIMATE-SIGMA**2 = .10902E+07 STANDARD ERROR OF THE ESTIMATE-SIGMA = 1044.1 SUM OF SQUARED ERRORS-SSE= .22894E+08 MEAN OF DEPENDENT VARIABLE = 12839. LOG OF THE LIKELIHOOD FUNCTION = -199.275 VARIABLE ESTIMATED STANDARD T-RATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 21 DF P-VALUE CORR. COEFFICIENT AT MEANS QD2 1331.4 493.0 2.700 .013 .508 .4109 .0259 SALES .39310E-01 .1057E-01 3.717 .001 .630 .5656 .4666 CONSTANT 6515.6 1623. 4.014 .001 .659 .0000 .5075
SHAZAM output|_OLS PROFITS QD SALES / NOCONSTANT OLS ESTIMATION 24 OBSERVATIONS DEPENDENT VARIABLE = PROFITS ...NOTE..SAMPLE RANGE SET TO: 1, 24 R-SQUARE = .5255 R-SQUARE ADJUSTED = .4256 VARIANCE OF THE ESTIMATE-SIGMA**2 = .11800E+07 STANDARD ERROR OF THE ESTIMATE-SIGMA = 1086.3 SUM OF SQUARED ERRORS-SSE= .22420E+08 MEAN OF DEPENDENT VARIABLE = 12839. LOG OF THE LIKELIHOOD FUNCTION = -199.023 RAW MOMENT R-SQUARE = .9944 VARIABLE ESTIMATED STANDARD T-RATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 19 DF P-VALUE CORR. COEFFICIENT AT MEANS QD 6688.4 1711. 3.908 .001 .668 2.0641 .1302 QD 8011.3 1827. 4.384 .000 .709 2.4724 .1560 QD 6470.6 1789. 3.617 .002 .639 1.9969 .1260 QD 6872.2 1892. 3.632 .002 .640 2.1208 .1338 SALES .38246E-01 .1148E-01 3.331 .004 .607 .5503 .4539
|