serial correlation 1 - transtutors...pure versus impure serial correlation consequences and...
TRANSCRIPT
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Serial Correlation 1
Pierre Nguimkeu — BUEC 333
Summer 2011
1Based on P. Lavergne, Lectures notes
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Outline
Pure Versus Impure Serial Correlation
Consequences and Detection
Remedies
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Pure Serial Correlation
Serial correlation Correlation across the error terms: Violates ClassicalAssumption 4.Happens in time-series, or if the order of observations has some meaningor importance.From now on,
Yt = β0 + β1X1t + β2X2t + εt t = 1, . . .T
We always haveIE (εt |Xt) = 0 ,
and then classical Assumption 2 holds. But
Cov (εt , εt−1) != 0
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Impure Serial CorrelationCaused by misspecification in the model, i.e. Classical Assumption 1 doesnot hold.If Yt = β0 + β1X1t + β2X2t + εt but we omit X2t , then
Yt = β0 + β1X1t + ε∗t where ε
∗t = εt + β2X2t
The new error term will be serially correlated if
• X2 is relevant, i.e. β2 != 0• X2 is serially correlated, and in particular has a trend• High autocorrelation if “size” of β2X2t large compared to “size” of εt
Remark We should actually write
Yt = β∗0 +β
∗1X1t +ε
∗t where ε
∗t = εt +β0+β1X1t +β2X2t−(β∗0 + β∗1X1t)
because the values of the coefficients may not be the same in the twoequations.If Yt = β0 + β1X1t + β2X 21t + εt but we specify a linear equation, then
Yt = β0 + β1X1t + ε∗t where ε
∗t = εt + f (X1t)
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Consequences
• Estimates remain unbiased• OLS is not BLUE in general, then OLS has not minimum variance• The standard errors are biased, typically too small• t-scores are typically too large, they don’t have a t-distribution, so
confidence intervals and hypothesis tests are unreliable.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Preliminary Checks
• Are there any obvious specification errors? Delay testing for serialcorrelation until you are confident with your specification.
• Is the dependent variable likely afflicted with serial correlation?
11
12
13
14
15
16
80 82 84 86 88 90 92 94 96 98 00 02
U.S. poverty rate
• Is there any autocorrelation in the OLS residuals?
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Autocorrelation Coefficient
Autocorrelation coefficient of order k for a time series Zt is
rk =
∑Tt=k+1
(Zt − Z̄
) (Zt−k − Z̄
)
∑Tt=1
(Zt − Z̄
)2 .
rk measures the correlation between the Z that are k-periods away.Note the difference with the correlation coefficient
r =
∑ni=1
[(Xi − X̄
) (Yi − Ȳ
)]√∑n
i=1
(Xi − X̄
)2√∑ni=1
(Yi − Ȳ
)2
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
First Order Autocorrelation
Key example: First-order autocorrelation of errors
εt = ρεt−1 + ut t = 1, . . . ,T
εt = error term at t,ut = a “classical error” term, not serially correlated,
and uncorrelated with εt−1ρ = the first-order autocorrelation coefficient.
ρ measures the strength of correlation between εt and εt−1.Then
r1 =
∑Tt=2 (εt − ε̄) (εt−1 − ε̄)∑T
t=1 (εt − ε̄)2
=
∑Tt=2 (ρεt−1 + ut − ε̄) (εt−1 − ε̄)∑T
t=1 (εt − ε̄)2
= ρ
∑Tt=2 ε
2t−1∑T
t=1 (εt − ε̄)2
+
∑Tt=2 (ut − ε̄) (εt−1 − ε̄)∑T
t=1 (εt − ε̄)2
≈ ρ .
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
First Order Autocorrelation (ct’d)
• The sign of ρ indicates the nature of serial correlation• Positive serial correlation: successive values tend to have the same
sign.Common situation in economics if we look at level variables.
• Negative serial correlation: successive values tend to alternate sign.Can occur when we look at variables in first-differences.
• As a correlation −1 < ρ< 1.• |ρ| ≥ 1 not reasonable, since it implies that the error term has a
tendency to “explode”
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Other Autocorrelation Patterns
Other possible forms of autocorrelation
Second-order serial correlation
εt = ρ1εt−1 + ρ2εt−2 + ut
Fourth-order for Quarterly Data
εt = ρεt−4 + ut
Fourth-orderεt = ρ1εt−1 + ρ2εt−2 + ρ3εt−3 + ρ4εt−4 + ut
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Correlogramm
We cannot compute the autocorrelations of the errors since we don’tobserve them.Rather we compute the autocorrelations of the residuals.Correlogram: graph of autocorrelation coefficients of the residuals.
Dependent Variable: POVERTYMethod: Least SquaresDate: 11/16/09 Time: 13:58Sample: 1980 2003Included observations: 24
Variable Coefficient Std. Error t-Statistic Prob.
C 9.792052 0.611186 16.02138 0.0000UNEMPLOY 0.586614 0.094726 6.192734 0.0000
R-squared 0.635460 Mean dependent var 13.47917Adjusted R-squared 0.618890 S.D. dependent var 1.095437S.E. of regression 0.676259 Akaike info criterion 2.135173Sum squared resid 10.06116 Schwarz criterion 2.233344Log likelihood -23.62207 F-statistic 38.34995Durbin-Watson stat 0.323725 Prob(F-statistic) 0.000003
Correlogram of RESID01
Date: 11/16/09 Time: 14:07Sample: 1980 2003Included observations: 24
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
1 0.756 0.756 15.506 0.0002 0.579 0.018 25.024 0.0003 0.353 -0.212 28.721 0.0004 0.068 -0.333 28.866 0.0005 -0.110 -0.020 29.260 0.000
The partial correlation of order k is the correlation of the εt with theεt−k , once we take into account the autocorrelation of order 1, 2, . . . k-1.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
The Durbin-Watson Test
• The regression includes an intercept• Potential serial correlation is first-order autocorrelation• The regression model does not include a lagged dependent variable
as an independent variable
The Durbin-Watson statistic is
d =
∑Tt=2 (et − et−1)
2
∑Tt=1 e
2t
• If there is extreme positive correlation, d ≈ 0. Imagine indeed thatet = et−1, then et − et−1 = 0 and d = 0.
• If there is extreme negative correlation, d ≈ 4. Since if et = −et−1,then et − et−1 = 2et and d ≈ 4.
• If there is no first-order autocorrelation, d ≈ 2.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
The Durbin-Watson Test (ct’d)
Indeed,
d =
∑Tt=2 (et − et−1)
2
∑Tt=1 e
2t
=
∑Tt=2 e
2t − 2
∑Tt=2 etet−1 +
∑Tt=2 e
2t−1∑T
t=1 e2t
≈∑T
t=2 e2t +
∑Tt=2 e
2t−1∑T
t=1 e2t
≈ 2 .
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Using the DW Test
• Obtain the OLS residuals and compute d• Determine the lower critical value dL and the upper critical value dU
from Tables B-4, B-5 or B-6.
For testing H0 : ρ ≤ 0 against HA : ρ > 0
Reject H0 if d < dLDo not reject H0 if d > dU
Inconclusive if dL ≤ d ≤ dU
Mostly apply if economic variables in levels.For testing H0 : ρ = 0 against HA : ρ != 0
Reject H0 if d < dL or d > 4− dLDo not reject H0 if 4− dU > d > dU
Inconclusive if dL ≤ d ≤ dU or 4− dU ≤ d ≤ 4− dL
Could apply to economic variables in first differences.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Poverty and Unemployment
Dependent Variable: POVERTYMethod: Least SquaresDate: 11/16/09 Time: 13:58Sample: 1980 2003Included observations: 24
Variable Coefficient Std. Error t-Statistic Prob.
C 9.792052 0.611186 16.02138 0.0000UNEMPLOY 0.586614 0.094726 6.192734 0.0000
R-squared 0.635460 Mean dependent var 13.47917Adjusted R-squared 0.618890 S.D. dependent var 1.095437S.E. of regression 0.676259 Akaike info criterion 2.135173Sum squared resid 10.06116 Schwarz criterion 2.233344Log likelihood -23.62207 F-statistic 38.34995Durbin-Watson stat 0.323725 Prob(F-statistic) 0.000003
We expect positive first-order autocorrelation. Here dL = 1.27 so wereject the null hypothesis of no first-order autocorrelation.Same conclusion as with the autocorrelogram.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
The Breusch-Godfrey Test
The idea of the Breusch-Godfrey test is similar to the White test: use theresiduals and run an auxiliary regression. It allows to test potentialhigh-order autocorrelation.
1. Estimate your equation Yt = β0 + β1X1t + β2X2t + εt by OLS andget the residuals et
2. Run the OLS “auxiliary regression”
et = α0 + α1X1t + α2X2t + γ1et−1 + . . . + γket−k + ut
That is regress the residuals on all independent variables and alllagged residuals up to order k.
3. Test the significance of all coefficients γ1, . . . γk with an F-test.
H0 : γ1 = γ2 = . . . = γk = 0 against HA : at least one is not 0
The test also works if there is dependent lagged variables as independentvariables.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Poverty and Unemployment
Dependent Variable: RESID01Method: Least SquaresDate: 11/16/09 Time: 14:08Sample (adjusted): 1982 2003Included observations: 22 after adjustments
Variable Coefficient Std. Error t-Statistic Prob.
C -0.773518 0.386543 -2.001119 0.0607UNEMPLOY 0.121246 0.060607 2.000527 0.0608RESID01(-1) 0.709750 0.219957 3.226764 0.0047RESID01(-2) 0.264418 0.246816 1.071313 0.2982
R-squared 0.764423 Mean dependent var 0.057323Adjusted R-squared 0.725160 S.D. dependent var 0.651709S.E. of regression 0.341659 Akaike info criterion 0.852961Sum squared resid 2.101161 Schwarz criterion 1.051333Log likelihood -5.382574 F-statistic 19.46936Durbin-Watson stat 1.869066 Prob(F-statistic) 0.000007
Wald Test:Equation: EQ02
Test Statistic Value df Probability
F-statistic 29.03862 (2, 18) 0.0000Chi-square 58.07724 2 0.0000
Null Hypothesis Summary:
Normalized Restriction (= 0) Value Std. Err.
C(3) 0.709750 0.219957C(4) 0.264418 0.246816
Restrictions are linear in coefficients.
Not only the F-test indicates that there is autocorrelation, but t-scoressuggest that only first-order autocorrelation is important.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Generalized Least-Squares
Yt = β0 + β1X1t + εt with εt = ρεt−1 + ut .
Yt = β0 + β1X1t + ρεt−1 + ut
ρYt−1 = ρβ0 + ρβ1X1t−1 + ρεt−1
Yt − ρYt−1 = β0 (1− ρ) + β1 (X1t − ρX1t−1) + ut .
We have a new equation that satisfies the classical assumptions:
Y ∗t = β∗0 + β1X
∗1t + ut (1)
where Y ∗t = Yt − ρYt−1 and X ∗1t = (X1t − ρX1t−1), calledquasi-differences.
• The error term is not serially correlated. Thus OLS are BLUE.• The slope β1 is the same as in the original equation.• The dependent variable has changed, so don’t compare the R2.
But we don’t know ρ!
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Feasible Generalized Least-Squares
Cochrane-Orcutt method
1. Estimate the original equation by OLS2. Estimate by OLS the auxiliary regression
et = ρet−1 + ut
3. Use ρ̂ to create quasi-differences and estimate Equation (1) by OLSto get β̂∗0 and β̂1.
4. Compute β̂0 = β̂∗0/ (1− ρ̂) and new residualset = Yt −
(β̂0 + β̂1Xt
).
5. Iterate the procedure until estimates do not change.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Feasible Generalized Least-Squares
The AR(1) methodAR(1) stands for AutoRegressive error term of order 1.Estimates simultaneously β0, β1 and ρ from
Yt − ρYt−1 = β0 (1− ρ) + β1 (X1t − ρX1t−1) + ut .
OLS cannot be used since the equation in nonlinear in the parameters.But Generalized Least-Squares (GLS) can be used. How?
minT∑
t=2
{Yt − ρYt−1 − β0 (1− ρ)− β1 (X1t − ρX1t−1)}2
with respect to β0, β1 and ρ.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Poverty and Unemployment
Dependent Variable: POVERTYMethod: Least SquaresDate: 11/16/09 Time: 13:58Sample: 1980 2003Included observations: 24
Variable Coefficient Std. Error t-Statistic Prob.
C 9.792052 0.611186 16.02138 0.0000UNEMPLOY 0.586614 0.094726 6.192734 0.0000
R-squared 0.635460 Mean dependent var 13.47917Adjusted R-squared 0.618890 S.D. dependent var 1.095437S.E. of regression 0.676259 Akaike info criterion 2.135173Sum squared resid 10.06116 Schwarz criterion 2.233344Log likelihood -23.62207 F-statistic 38.34995Durbin-Watson stat 0.323725 Prob(F-statistic) 0.000003
Dependent Variable: POVERTYMethod: Least SquaresDate: 11/16/09 Time: 14:19Sample (adjusted): 1981 2003Included observations: 23 after adjustmentsConvergence achieved after 31 iterations
Variable Coefficient Std. Error t-Statistic Prob.
C 9.890041 0.759313 13.02498 0.0000UNEMPLOY 0.583454 0.107377 5.433708 0.0000
AR(1) 0.807484 0.133612 6.043504 0.0000
R-squared 0.893796 Mean dependent var 13.50000Adjusted R-squared 0.883175 S.D. dependent var 1.115184S.E. of regression 0.381166 Akaike info criterion 1.029942Sum squared resid 2.905746 Schwarz criterion 1.178050Log likelihood -8.844339 F-statistic 84.15827Durbin-Watson stat 1.724090 Prob(F-statistic) 0.000000
Inverted AR Roots .81
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Feasible Generalized Least-Squares
Remarks
• Cochrane-Orcutt is a pioneering method. It is good to know it, butAR(1) is mostly used now.
• AR(1) may not work well in small samples.• Caution: When using AR(1), the R2, standard error of the
regression, and DW are computed by Eviews in a specific way. Don’tpay attention to them!
• We may want to allow for autocorrelation of order 2: AR(2)!
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
HAC Robust Standard Errors
In place of using another estimation method, we use OLS (which isunbiased and consistent) and correct the computation of the standarderrors. Heteroscedasticity and AutoCorrelation robust standard errors:also called Newey-West standard errors
• Estimate the standard deviation of the OLS coefficients whetherthere is heteroscedasticity and autocorrelation or not
• Are often larger than the OLS standard errors• Can be used to construct tests and confidence intervals in the usual
way
• Works best in “large” samples• Are given by Eviews, see Options/Heteroscedasticty consistent
coefficient covariance.
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Poverty and Unemployment
Dependent Variable: POVERTYMethod: Least SquaresDate: 11/16/09 Time: 13:58Sample: 1980 2003Included observations: 24
Variable Coefficient Std. Error t-Statistic Prob.
C 9.792052 0.611186 16.02138 0.0000UNEMPLOY 0.586614 0.094726 6.192734 0.0000
R-squared 0.635460 Mean dependent var 13.47917Adjusted R-squared 0.618890 S.D. dependent var 1.095437S.E. of regression 0.676259 Akaike info criterion 2.135173Sum squared resid 10.06116 Schwarz criterion 2.233344Log likelihood -23.62207 F-statistic 38.34995Durbin-Watson stat 0.323725 Prob(F-statistic) 0.000003
Dependent Variable: POVERTYMethod: Least SquaresDate: 11/16/09 Time: 14:20Sample: 1980 2003Included observations: 24Newey-West HAC Standard Errors & Covariance (lag truncation=2)
Variable Coefficient Std. Error t-Statistic Prob.
C 9.792052 0.744832 13.14665 0.0000UNEMPLOY 0.586614 0.105420 5.564560 0.0000
R-squared 0.635460 Mean dependent var 13.47917Adjusted R-squared 0.618890 S.D. dependent var 1.095437S.E. of regression 0.676259 Akaike info criterion 2.135173Sum squared resid 10.06116 Schwarz criterion 2.233344Log likelihood -23.62207 F-statistic 38.34995Durbin-Watson stat 0.323725 Prob(F-statistic) 0.000003
-
Pure Versus Impure Serial Correlation Consequences and Detection Remedies
Impure Correlation and The Philips Curve
Dependent Variable: INFLMethod: Least SquaresDate: 10/13/09 Time: 22:30Sample: 1958 2004Included observations: 47
Variable Coefficient Std. Error t-Statistic Prob.
C 0.008736 0.018306 0.477214 0.6355UNEMPLOY 0.542127 0.300264 1.805503 0.0777
R-squared 0.067548 Mean dependent var 0.040902Adjusted R-squared 0.046827 S.D. dependent var 0.029548S.E. of regression 0.028848 Akaike info criterion -4.211930Sum squared resid 0.037449 Schwarz criterion -4.133201Log likelihood 100.9804 F-statistic 3.259841Durbin-Watson stat 0.448168 Prob(F-statistic) 0.077688
Dependent Variable: INFLMethod: Least SquaresDate: 10/13/09 Time: 22:34Sample (adjusted): 1959 2004Included observations: 46 after adjustments
Variable Coefficient Std. Error t-Statistic Prob.
C 0.038913 0.010023 3.882169 0.0004UNEMPLOY -0.677368 0.194650 -3.479923 0.0012
INFL(-1) 1.021775 0.093617 10.91446 0.0000
R-squared 0.753863 Mean dependent var 0.041197Adjusted R-squared 0.742415 S.D. dependent var 0.029805S.E. of regression 0.015127 Akaike info criterion -5.481707Sum squared resid 0.009839 Schwarz criterion -5.362448Log likelihood 129.0793 F-statistic 65.84976Durbin-Watson stat 1.533848 Prob(F-statistic) 0.000000
Pure Versus Impure Serial CorrelationConsequences and DetectionRemedies