Testing For Autocorrelated Errors Flashcards
Non-rigorous way of detecting autocorrelated errors
Analyse the plots.
E.g if spikey likely to be negative autocorrel, if smooth then pos, random then p=0 likely!)
Formal method to test for autocorrelation
Durbin Watson test (DW) test
What does the DW test test for
First order autocorrelation, (what we have learnt i.e
error term written as
εt = pεt-₁ + ut
What is null hypothesis for DW
H₀: P=0 (means CLRA satisfied, so no auto!
So if we reject means autocorrelated, so error is a function of its past.
Test statistic formula for DW
(Most software compute for u)
Σ(εhatt-Ehatt-₁)²
/
ΣεHat²
~ Look up in table n, k to find dl and du
(n is observations, k is amount of explanatory variables)
We get 2 critical values left and right side where our hypothesis of non-autocorrelation p=0 can be rejected.
(Value will only be between 0-4)
If DW lies between…
Where is positive, where is negative, where is no correlation, where is inconclusive
<dL = reject p=0, positive autocorrelation
>4-dL =reject p=0, negative autocorrelation
In between dU and 4-dU = no autocorrel
Betwwen dL and dU = inconclusive
Between 4-dU and 4-dL = inconclusive
Note;
around 2 = likely no autocorrelation (cannot reject null)
Since it is in between dU and 4 - dU where no autocorrelation!
When is this DW test invalid (2)
For things other than first order regression! I.e if not in form εt = pεt-₁ + ut
If dependent value is lagged! Yt-f
What test overcomes faults of DW test (of only being able to test first order autocorrelation)
Breusch-Godfrey test (BG)
(Allows to test for pth order autocorrelation, not just first order)
Now we have a new test regression, what does this look like?
Ehatt = β₀ + βhat₁X₁+…βhatkXkt +
What is the null and alternate in the BG test.
H₀=P₁=P₂=…=Pp=0 (no autocorrelation)
H₁: at least one autocorrelation coefficient is not 0 (autocorrelation)
Test statistic for BG
Lagrance multiplier (LM)
LM = nR² ~ X²p
Sample size n x R² (goodness of fit)
p degrees of freedom using the X² distribution table
E.g if want 2nd order autocorrel p=2, so can still do 1st order just like the DW test, just set p=1!)
So if no autocorrelation: We can use OLS fine (given other assumptions hold as well)
If autocorrelated erros exist (which we test for via DW or BG): it means OLS estimates incorrect, so what 2 methods can we use?
Generalised least squares: Removes autocorrelation from the errors, so it is then OK to use OLS
Cochrane-Orcutt - extension of GLS
(So DW and BG determine whether autocorrelation exists, GLS and CO are for actually continuing with the estimation!)
GLS process.
Start with:
Yt=β₀ +β₁Xt+εt
And we have used BG or DW and established autocorrelation so errors can be written as
εt= pεt-₁ +ut
Lag the model by one period.
Yt-₁ =β₀ + β₁Xt-₁ + εt-₁
Multiply by p
pYt-₁ =pβ₀ + pβ₁Xt-₁ + pεt-₁
Subtract this from original (Yt - pYt-₁)
β₀* + β₁Xt* + ut
Where
Yt* = Yt - pYt-₁
Xt* = Xt- pXt-₁ are quasi differences.
Here also, error term is uncorrelated since it is ut (uncorrelated as mentioned earlier)