Tutorial Session 10 Autocorrelation Solution
Tutorial Session 10 Autocorrelation Solution
• Autocorrelation occurs when the error term for the current period in time-series data are
correlated with the error terms for prior periods. Autocorrelation is problematic because it
violates a CLRM assumption, which states that the error terms are uncorrelated over time.
• As a result, OLS estimates are unbiased but inefficient in the presence of autocorrelation and,
• all standard errors, hypothesis tests and confidence intervals are incorrect.
2. Suppose you are interested in explaining variation in monthly ice cream consumption (thousands
of litres) and that you estimate the regression function (standard errors in parentheses)
𝐼𝐼𝐼𝐼𝐼𝐼 �
𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝑡𝑡 = 247.93 + 12.22 𝐼𝐼𝐼𝐼𝐼𝐼𝐼𝐼𝐼𝐼𝐼𝐼𝑡𝑡 + 217.39 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑡𝑡
𝑛𝑛 = 192
𝑅𝑅 2 = 0.9287
a) How many years’ worth of data do you have? How can you tell? Explain.
• There are 16 years’ worth of data. This is because there are 192 monthly observations and
192/12=16.
b) Do you suspect that autocorrelation might be present in this model? If so, what type? Explain.
• Yes. Positive autocorrelation is likely present in these data because ice cream sales in a given
month are likely highly correlated with ice cream sales in a prior month. For example, because
ice cream sales are likely highest in summer months and lowest in winter months, it is likely
to see higher sales in November, December, January, and February and lower sales in June,
July, August, and September. As such, higher values of the error term are likely to follow
higher values of the error term while lower values of the error term are likely to follow lower
values of the error term.
Page 1 of 4
Based on the above, does it confirm or negate your answer in (b) above? Explain why or why
not.
3. You estimate a model in which you seek to find out the number of shipments sent out for a
shipping company each month and the number of calls they get each month. You obtain
the following results:
regdw shipments calls
------------------------------------------------------------------------------
shipments | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
calls | -.0136982 .1009199 -0.14 0.892 -.2139706 .1865741
_cons | 101.7095 10.18843 9.98 0.000 81.49094 121.9282
------------------------------------------------------------------------------
Durbin-Watson Statistic = 2.707735
Perform a one-sided test at the 5% level for the presence of autocorrelation. State your
null and alternative hypotheses and show/explain all reasoning.
Page 2 of 4
H0: ρ ≥ 0 (No negative autocorrelation)
H1: ρ < 0 (Evidence for negative autocorrelation)
α = 0.05 d = 2.708
4. You then do the following with the dataset above, obtaining the results that follow:
. gen Dshpmnts = shipments - shipments[_n-1]
(1 missing value generated)
. gen Dcalls = calls - calls[_n-1]
(1 missing value generated)
. reg Dshpmnts Dcalls, noconstant
------------------------------------------------------------------------------
Dshpmnts | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Dcalls | -.4181033 .0886264 -4.72 0.000 -.5939795 -.2422271
------------------------------------------------------------------------------
predict et, residuals
(1 missing value generated)
a) What remedial measure were you applying? What assumptions did you make?
• I was applying Generalised Least Squares (specifically, the first differences method)
in order to remedy the autocorrelation. I assumed that ρ = 1 in ut = ρut-1 + εt.
Page 3 of 4
Using the results from the Run test:
H0: ρ = 0 (No autocorrelation)
H1: ρ ≠ 0 (Autocorrelation exists)
The p-value from the Run test is 0.27. Hence we fail to reject H0 at all the conventional
significance levels (0.01, 0.05, 0.10).
• We conclude that there is no autocorrelation in the corrected model. Thus, the remedy
has been successful.
Page 4 of 4