# Assignment 1 with solution

Assignment 1

You are the chief analyst to monitor an eastern city’s government consumption expenditures. Using the city’s quarterly government consumption data {yt} measured in billion dollars from 2007-Q1 to 2014-Q3, you are trying to estimate the linear trend model: yt =  + t + ut, where ut ~ N(0, ). (A)Supposing t = 1 for the starting quarter (i.e., 2007-Q1), then what is t for 2014-Q3?(1 mark) (B)Suppose your OLS (ordinary least squares) estimates for the trend model are = 1.62 and = 3.55, and the sum of squared residuals (SSR) = ût2 = 725.

Based on your estimated trend model, construct a point forecast and an interval forecast for the city’s government consumption expenditures in 2014-Q4.(9 marks) (C)It is calculated that = 928. Use the Durbin-Watson (DW) test to determine if there is (first-order) serial-correlation in the population errors {ut} at the 5% significance level. (The corresponding lower and upper critical values of the DW-test is dL = 1.363 and dU = 1.496 respectively.) (5 marks)

2. The quarterly data for U.S.’s beverage manufacturer product shipments (yt) from Q1-1992 to Q4-2006 is given in the data file: Asgn1_data.xls, based on which some models are required to estimate and some forecasts to make. 2.1Estimating trend and making trend forecasts(11 marks) (A)Indicate the patterns in the data (by plotting the data and observing the graph).(1 mark) (B)

Fit a regression trend line ŷt =+t to the data using the ordinary least squares (OLS) method, and write down the fitted trend line. (3 marks) (C)Denoting the in-sample fitted errors by et = yt – ŷt, find the standard error of regression () for the linear trend model and write down the formula for it (using et).(2 marks) (D)Is the fitted trend line a good one? Comment using R2 and t-test.(1 mark) (E) Based on your trend line, forecast the shipments (yt) values from Q1-2007 to Q4-2007. Also find the confidence interval for the forecast for Q4-2012. (4 marks)

2.2Estimating seasonality and making seasonal forecasts(13 marks) (F)Indicate the patterns in the above-fitted errors {et} (by plotting the data and observing the graph).(1 mark) (G)Define and write down the four quarterly dummy variables D1t, D2t, D3t and D4t.(2 marks) (H)Regress {et} on the quarterly dummy variables: et = 1D1t + 2D2t + 3D3t + 4D4t + t. Write down this new fitted-model, and briefly explain the meanings of the results.(3 marks) (I)Is this model a good one? Comment using R2 and t-test.(2 marks) (J)

Based on this fitted model, forecast the et values from Q1-2007 to Q4-2007. Also find the confidence interval for the forecast for Q4-2012. (3 marks) (K)Adding up the above two forecasts [one for trend and one for errors] results in the final forecasts for yt. Write down these forecasts from Q1-2007 to Q4-2007.(2 marks) 2.3Estimating and forecasting trend and seasonality using one model(11 marks) The above two steps can be combined to form a single model to forecast yt as follows: yt =  + 0t + 1D1t + 2D2t + 3D3t + t.

(L)Explain why D4t is not included into this new model.(1 mark) (M)Estimate this new model, and write down the fitted model.(2 marks) (N)Is this model a good one? Comment using R2 and t-test.(2 marks) (O)Compare this model’s fitted results with the above two models’ results, and make comments. (2 marks) (P) Based on this model, forecast the shipments (yt) values from Q1-2007 to Q4-2007. Also find the confidence interval for the forecast for Q4-2012. Are these forecasts the same as those obtained above?(4 marks) Solutions to Q1:

(A)t = 31 for 2014-Q3.(1 mark)(B)Residual variance: = SSR / (31-2) = 725/29 = 25.(3 marks) Standard error of regression: = 251/2 = 5.(1 mark) Point forecast for 2014-Q4 (t = 32):ŷ32 = 1.62 + 3.55(32) = 115.22 billion dollars(2 marks) (95% confidence) Interval forecast:ŷ32  1.96(5) = 115.22  9.80 = [105.42, 125.02](3 marks) (C)DW = / SSR = 928 / 725 = 1.28,(2 marks)

which is lower than the lower critical values of dL = 1.363,(1 mark) so we can reject the no serial-correlation hypothesis, i.e., the population errors have positive (first-order) serial correlation at the 5% significance level. (2 marks)

Solutions to Q2:2.1(11 marks)(A)The series shows an increasing trend and a clear quarterly pattern, as shown below. (1 mark)

(B)The fitted trend line is: ŷt = 12.2477 + 0.1137t, with T = 60, R2 = 0.769, and the t-values for the two regression coefficients being 42.7 and 13.9 respectively. (3 marks) (C)The standard error of regression is: = (åt=1~60 et2 /58)1/2 = 1.097.(1 mark) (D)The fitted trend line is a good one, since R2 = 0.769 is quite high, and the t-tests show that the two regression coefficients are highly significant.(2 marks) (E) Q1-2007 (t=61): ŷ61 = 12.2477 + 0.1137*61 = 19.183;Q2-2007 (t=62): ŷ62 = 12.2477 + 0.1137*62 = 19.297. Q3-2007 (t=63): ŷ63 = 12.2477 + 0.1137*63 = 19.411;Q4-2007 (t=64): ŷ64 = 12.2477 + 0.1137*64 = 19.525.

(2 marks)Q4-2012 (t=84): ŷ84 = 12.2477 + 0.1137*84 = 21.799, and the 95% confidence interval for the forecast is:ŷ84  1.96*1.097 = 21.799  2.150 = (19.649, 23.949).(2 marks)

2.2(13 marks)(F)The above-fitted residuals {et} have no trend, but have clear quarterly pattern, as shown below.(1 mark)

(G)D1t = 1 for Quarter 1 and = 0 for other quarters, i.e., D1t = {1, 0, 0, 0, 1, 0, 0, 0, ……}.(0.5-mark)D2t = 1 for Quarter 2 and = 0 for other quarters, i.e., D2t = {0, 1, 0, 0, 0, 1, 0, 0, ……}.(0.5-mark)D3t = 1 for Quarter 3 and = 0 for other quarters, i.e., D3t = {0, 0, 1, 0, 0, 0, 1, 0, ……}.(0.5-mark)D4t = 1 for Quarter 4 and = 0 for other quarters, i.e., D4t = {0, 0, 0, 1, 0, 0, 0, 1, ……}.(0.5-mark) (H)The fitted model is:êt = -1.3113D1t + 1.0521D2t + 0.7883D3t – 0.5290D4t. (2 marks)

t-value:(-10.18)(8.17)(6.12)(-4.11)[R2 = 0.80, = 0.4989] The modeling results imply that: for quarters 1, 2, 3 and 4, the average residuals (et) are -1.3113, 1.0521, 0.7883 and -0.5290 respectively.(1 mark) (I)The fitted seasonal model is a good one, since R2 = 0.80 is quite high, and the t-tests show that the four regression coefficients (for the four quarters) are highly significant.(2 marks) (J) Q1-2007 (t=61): ê61 = -1.3113.Q2-2007 (t=62): ê62 = 1.0521.(1 mark) Q3-2007 (t=63): ê63 = 0.7883.Q4-2007 (t=64): ê64 = -0.5290.(1 mark) Q4-2012 (t=84): ê84 = -0.5290, and the 95% confidence interval for the forecast is:

ê84  1.96*0.4989 = -0.5290  0.9778 = (-1.5068, 0.4488).(1 mark) (K)Final forecast of yt forQ1-2007 (t=61): ŷ61 + ê61 = 19.183 + (-1.3113) = 17.8717,(0.5-mark) Q2-2007 (t=62): ŷ62 + ê62 = 19.297 + 1.0521 = 20.3491,(0.5-mark) Q3-2007 (t=63): ŷ63 + ê63 = 19.411 + 0.7883 = 20.1993,(0.5-mark) Q4-2007 (t=64): ŷ64 + ê64 = 19.525 + (-0.5290) = 18.9960.(0.5-mark)

2.3(11 marks)(L)D4t cannot be included into the model, otherwise we will have the dummy trap problem since D1t + D2t + D3t + D4t = 1.Also, the effect of D4t in yt is already reflected by the intercept , so there is no need to introduce it into the model explicitly.(1 mark) (M)The fitted model is:ŷt = 11.7466 + 0.1128t – 0.7849D1t + 1.5794D2t + 1.3164D3t.(2 marks)

t-value:(66.35)(30.02)(-4.26)(8.59)(7.16) [R2 = 0.95, = 0.5032] (N)The fitted model is a good one, since R2 = 0.95 is very high, and the t-tests show that the five regression coefficients are highly significant.(2 marks) (O)The new model’s fits are slightly better than the above two-model’s combined fits in that: (1) the new model’s fitted residuals are averaged to zero, but the above two-model’s combined fits have an average residual of -0.000025, slightly derived from zero; (2) average squared residual (i.e., SSR/60) for the new model is 0.232081, slightly lower than that of 0.232308 for the above two-model’s combined fits. (2 marks)

(P) Q1-2007 (t=61): ŷ61 = 11.7466 + 0.1128*61 – 0.7849*1 =17.8425,(0.5-mark) Q2-2007 (t=62): ŷ62 = 11.7466 + 0.1128*62 + 1.5794*1 = 20.3196,(0.5-mark) Q3-2007 (t=63): ŷ63 = 11.7466 + 0.1128*63 + 1.3164*1 = 20.1694,(0.5-mark) Q4-2007 (t=64): ŷ64 = 11.7466 + 0.1128*64 = 18.9658.(0.5-mark) Q4-2012 (t=84): ŷ84 = 11.7466 + 0.1128*84 = 21.2218, and the 95% confidence interval for the forecast is:

ŷ84  1.96*0.5032 = 21.2218  0.9863 = (20.2355, 22.2081).(1 mark)These forecasts are slightly lower than the above two-model’s combined forecasts.(1 mark)