+ All Categories
Home > Documents > Lecture 18. Serial correlation: testing and estimation...

Lecture 18. Serial correlation: testing and estimation...

Date post: 14-Mar-2018
Category:
Upload: dotruc
View: 213 times
Download: 1 times
Share this document with a friend
21
Lecture 18. Serial correlation: testing and estimation Testing for serial correlation In lecture 16 we used graphical methods to look for serial/autocorrelation in the random error term t u . Because we cannot observe the t u we used the OLS residuals t e . We looked at Time series graph of n t e t , , 1 , = . If there is serial correlation this graph shows gradual changes in the t e . Scatterplot of t e versus 1 t e . If the AR(1) model t t t u u ε ρ + = 1 holds, then we expect that the scatterplot is concentrated along a straight line through 0. Tests for serial/autocorrelation also use the OLS residuals t e .
Transcript
Page 1: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Lecture 18. Serial correlation: testing and estimation Testing for serial correlation In lecture 16 we used graphical methods to look for serial/autocorrelation in the random error term tu . Because we cannot observe the tu we used the OLS residuals te . We looked at

• Time series graph of ntet ,,1, …= . If there is serial correlation this graph shows gradual changes in the te .

• Scatterplot of te versus 1−te . If the AR(1) model ttt uu ερ += −1 holds, then we expect that the scatterplot is concentrated along a straight line through 0.

Tests for serial/autocorrelation also use the OLS residuals te .

Page 2: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Consider the linear regression model

ntuXXY ttKKtt ,,1,221 KL =+++= βββ As with tests for heteroskedasticity we assume a particular model for the autocorrelation. Initially we consider first-order serial correlation (1) ttt uu ερ += −1 11 <<− ρ with tε white noise (the tε ’s are independent and have all the same variance and mean 0). If 0=ρ , then ttu ε= and in that case the random errors tu satisfy Assumption 4, i.e. there is no serial correlation. Hence a test for serial correlation is a test of

0:0 =ρH .

Page 3: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

First step is to find estimator for ρ . If we replace tu in (1) by te and estimate ρ by OLS we obtain

=

=−

=n

tt

n

ttt

e

ee

1

2

21

ρ̂

This is also the first-order autocorrelation coefficient of the time series ntet ,,1, K= (see lecture 16) . The obvious thing to do is to use ρ̂ to test whether 0=ρ . Instead of ρ̂ , a related quantity is used, the Durbin-Watson statistic d

=

=−−

=n

tt

n

ttt

e

ee

d

1

2

2

21)(

Page 4: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

It can be shown )ˆ1(2 ρ−=d Hence if ρ̂ close to 0 (no autocorrelation) then d is close to 2. If ρ̂ is close to 1, then d is close to 0 and if ρ̂ is close to –1, then d is close to 4 positive no negative autocor. autocor. autocor. 0 2 4 ___|____|__|__|_____|______________|__ Lc c Uc d Because negative autocorrelation is rare, the usual test is 0:0 =ρH against 0:1 >ρH . We reject (see graph) if d is small, i.e. close to 0. The critical value is than some number c greater than 0 but less than 2.

Page 5: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses
Page 6: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

With a 5% significance level we want to have that if 0H is true, then the probabability of rejection of 0H

05.)Pr( =< cd If the errors have a normal distribution (assumption 5), then the distribution of d can be derived. This distribution depends on the independent variables KXX ,,2 K . Compare with the t- or F-distribution that do not depend on this. Some programs compute c exactly for the independent variables in your dataset. This is easy with current computers. If not, then there is a table with bounds Lc and Uc . These bounds are for ‘extreme’ datasets and the c for any dataset is between them.

Page 7: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Example: for 2 independent variables (do not count the constant) and 25 observations

206.1=Lc and 550.1=Uc . Hence if e.g. 1.1=d we reject and if 7.1=d we do not reject. If

3.1=d we do know what to do (test is inconclusive). This is computational problem, because c can be computed. Consider regression log housing starts per head on log GNP per head and log mortgage interest rate The DW statistics is .913 with n=23, k’=2, so that 168.1=Lc and we reject the hypothesis of no serial correlation.

Page 8: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: LNHOUSINGCAPMethod: Least SquaresDate: 11/13/01 Time: 00:06Sample: 1963 1985Included observations: 23

Variable Coefficient Std. Error t-Statistic Prob.

C 2.528899 1.180472 2.142278 0.0447LNGNPCAP -0.066000 0.540505 -0.122109 0.9040LNINTRATE -0.211284 0.202894 -1.041351 0.3101

R-squared 0.094147 Mean dependent var 1.991961Adjusted R-squared 0.003562 S.D. dependent var 0.226095S.E. of regression 0.225692 Akaike info criterion -0.018186Sum squared resid 1.018735 Schwarz criterion 0.129922Log likelihood 3.209133 F-statistic 1.039325Durbin-Watson stat 0.913015 Prob(F-statistic) 0.372027

Page 9: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Alternative to DW test is the Lagrange Multiplier (LM) test. Also uses the OLS residuals te . The first step of the test is a linear regression with dependent variable te and independent variables 12 ,,, −ttKt eXX K . Compute the 2R of this regression. The test statistic is 2)1( RnLM −= Note that we use 1−n observations in the regression. If 0:0 =ρH is true than LM has a chi-square distribution with 1 d.f. We reject if

cLM > and if we want a test with a 5% significance level we find the critical value c from 05.)Pr( => cLM

Page 10: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Application to housing start data 6.85311.*22 ==LM and the critical value for 5% significance is 3.84. Again we reject 0H . Estimation with serial correlation Consider the linear regression

ttt uXY ++= 21 ββ and ttt uu ερ += −1 AR(1) How do we estimate the regression parameters and ρ ? As with heteroskedasticity we transform the variables such that we have a random error term that satisfies the assumptions 1-4. Hence we can apply OLS to the transformed regression.

Page 11: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: RESID01Method: Least SquaresDate: 11/14/01 Time: 23:56Sample(adjusted): 1964 1985Included observations: 22 after adjusting endpoints

Variable Coefficient Std. Error t-Statistic Prob.

C 0.330654 1.284974 0.257324 0.7998LNGNPCAP -0.233173 0.596719 -0.390759 0.7006LNINTRATE 0.147169 0.203398 0.723551 0.4786

RESID01LAG 0.586673 0.208829 2.809346 0.0116

R-squared 0.311452 Mean dependent var -0.006314Adjusted R-squared 0.196694 S.D. dependent var 0.218061S.E. of regression 0.195443 Akaike info criterion -0.264134Sum squared resid 0.687561 Schwarz criterion -0.065763Log likelihood 6.905473 F-statistic 2.713985Durbin-Watson stat 1.272797 Prob(F-statistic) 0.075366

Page 12: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Because tε satisfies all the usual assumptions we must get this as the random error term. Note 1−−= ttt uu ρε Now do the subtraction ttt uXY ++= 21 ββ 11211 −−− ++= ttt uXY ρρβρβρ _______________________ (1) ttttt XXYY ερββρρ +−+−=− −− )()1( 1211 Conclusion: if we transform the dependent variable to 1−− tt YY ρ and the independent variable to 1−− tt XX ρ we can use OLS to estimate 2β . Note that the OLS estimator of the constant does not estimate 1β , but if we divide the OLS estimator of the constant by ρ−1 we get an estimator of 1β .

Page 13: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Problem with this method: We do not know ρ . Solution: Choose range of values for ρ , e.g. -.99, -.98, …., .98, .99 and estimate (1) for each of these values. For each ρ compute the residuals )()1( 1211 −− −−−−−= ttttt XXYYe ρββρρ and the sum of squared residuals. Choose the value of ρ and the OLS estimators of 21, ββ that has the smallest sum of squared residuals. This the Hildreth-Lu procedure. Application to consumption and wages (billion 1992$) for US 1959-1994.

• Test for AR(1) errors (DW and LM) • Compare estimates and standard errors

Page 14: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: CONSMethod: Least SquaresDate: 11/15/01 Time: 01:10Sample: 1959 1994Included observations: 36

Variable Coefficient Std. Error t-Statistic Prob.

C 1614.711 59.81012 26.99729 0.0000WAGES 0.769682 0.030647 25.11440 0.0000

R-squared 0.948852 Mean dependent var 2811.178Adjusted R-squared 0.947347 S.D. dependent var 945.5435S.E. of regression 216.9661 Akaike info criterion 13.65131Sum squared resid 1600526. Schwarz criterion 13.73929Log likelihood -243.7236 F-statistic 630.7330Durbin-Watson stat 0.072411 Prob(F-statistic) 0.000000

Page 15: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: RESID01Method: Least SquaresDate: 11/15/01 Time: 01:12Sample(adjusted): 1960 1994Included observations: 35 after adjusting endpoints

Variable Coefficient Std. Error t-Statistic Prob.

C 48.97566 13.26937 3.690880 0.0008WAGES -0.026748 0.006724 -3.978251 0.0004

RESID01LAG 0.930118 0.037631 24.71658 0.0000

R-squared 0.950467 Mean dependent var 12.50131Adjusted R-squared 0.947371 S.D. dependent var 203.1813S.E. of regression 46.61194 Akaike info criterion 10.60341Sum squared resid 69525.55 Schwarz criterion 10.73672Log likelihood -182.5596 F-statistic 307.0144Durbin-Watson stat 1.096482 Prob(F-statistic) 0.000000

Page 16: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: CONSMethod: Least SquaresDate: 11/15/01 Time: 01:13Sample(adjusted): 1960 1994Included observations: 35 after adjusting endpointsConvergence achieved after 8 iterations

Variable Coefficient Std. Error t-Statistic Prob.

C 2566.421 932.1594 2.753200 0.0096WAGES 0.519497 0.138746 3.744220 0.0007

AR(1) 0.943172 0.047851 19.71054 0.0000

R-squared 0.997574 Mean dependent var 2851.680Adjusted R-squared 0.997423 S.D. dependent var 927.1223S.E. of regression 47.06673 Akaike info criterion 10.62283Sum squared resid 70888.86 Schwarz criterion 10.75614Log likelihood -182.8995 F-statistic 6580.217Durbin-Watson stat 1.135516 Prob(F-statistic) 0.000000

Inverted AR Roots .94

Page 17: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Alternative interpretation of AR(1) errors The linear regression in (1) can be rewritten as (2) ttttt XXYY ερββρβρ +−++−= −− 12211)1(

This is a linear regression model with independent variables 11 ,, −− ttt XXY . In the model with only tX as independent variable 11, −− tt XY are omitted and relegated to the error term. Because both variables are economic time series and change gradually the error term is autocorrelated. Compare (2) to the linear regression model (3) ttttt XXYY εγγγγ ++++= −− 143121 Note that (3) has 4 regression coefficients and

(2) has 3. (3) becomes (2) if 23

4 γγγ

−= .

Page 18: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

If we estimate (3) we find 691.ˆ 4 −=γ , 718.ˆ3 =γ , 933.ˆ2 =γ and hence

962.718.

691.

ˆ

ˆ

3

4 −=−

=γγ

Note that (3) is more general and an alternative to (2).

Page 19: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: CONSMethod: Least SquaresDate: 11/15/01 Time: 01:15Sample(adjusted): 1960 1994Included observations: 35 after adjusting endpoints

Variable Coefficient Std. Error t-Statistic Prob.

C 158.1357 75.36761 2.098192 0.0441CONSLAG 0.932914 0.049885 18.70140 0.0000WAGES 0.717754 0.288670 2.486413 0.0185

WAGESLAG -0.691637 0.279581 -2.473829 0.0190

R-squared 0.997622 Mean dependent var 2851.680Adjusted R-squared 0.997391 S.D. dependent var 927.1223S.E. of regression 47.35197 Akaike info criterion 10.66030Sum squared resid 69508.48 Schwarz criterion 10.83806Log likelihood -182.5553 F-statistic 4334.325Durbin-Watson stat 1.101519 Prob(F-statistic) 0.000000

Page 20: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Dependent Variable: RESID02Method: Least SquaresDate: 11/15/01 Time: 01:16Sample(adjusted): 1961 1994Included observations: 34 after adjusting endpoints

Variable Coefficient Std. Error t-Statistic Prob.

C 9.395652 14.09111 0.666779 0.5100WAGES -0.193875 0.205809 -0.942015 0.3537

WAGESLAG 0.202677 0.216017 0.938248 0.3556RESID02LAG 0.477410 0.166159 2.873215 0.0074

R-squared 0.217167 Mean dependent var 1.297489Adjusted R-squared 0.138884 S.D. dependent var 45.22842S.E. of regression 41.97033 Akaike info criterion 10.42193Sum squared resid 52845.25 Schwarz criterion 10.60151Log likelihood -173.1729 F-statistic 2.774118Durbin-Watson stat 1.845907 Prob(F-statistic) 0.058508

Page 21: Lecture 18. Serial correlation: testing and estimation ...ridder/Lnotes/Undeconometrics/Transparanten... · Alternative to DW test is the Lagrange M ultiplier (LM) test. Also uses

Prediction with AR(1) The prediction of 1+tY is

ttttt

tttt

eXXYX

XXYY

ρβββρββ

βρβρβρ

ˆˆˆ)ˆ(ˆˆˆ

ˆˆˆˆˆ)ˆ1(ˆ

1212121

21211

++=−++=

=−++−=

++

++

Compare this with 1211

ˆˆˆ ++ += tt XY ββ for the linear regression without serial correlation. The error in period 1+t can be predicted using the residual in period t .


Recommended