第10章序列相关性课件.ppt
第10章序列相关性,Serial Correlation/Autocorrelation,第10章序列相关性Serial Correlation/,Main Contents,What is Serial correlation(Autocorrelation)?The consequences of serial correlationHow to detect the serial correlation?Corrections for serial correlation,Main ContentsWhat is Serial co,What is Serial correlation(Autocorrelation)?,The assumption that errors corresponding to different observations are uncorrelated often breaks down in time-series studies.When the error terms from different(usually adjacent)time periods are correlated,we say that the error term is serially correlated.That is,Cov(ui,uj)0,i.e.E(ui,uj)0 for i j.,What is Serial correlation(Au,Patterns of serial correlation,Patterns of serial correlation,Reasons of serial correlation,Inertia or sluggishnessModel specification errors(omitted variables),Reasons of serial correlationI,What is Serial correlation(Autocorrelation)?,In this chapter,we only deal with the problem of first-order serial correlation,in which errors in one time period are correlated directly with errors in the ensuing period.For example,ut=r ut-1+vtSecond-order serial correlation will be ut=r1ut-1+r2ut-2+vt,What is Serial correlation(Au,第10章序列相关性课件,The consequences of serial correlation(Autocorrelation),OLS estimators will be still unbiased and consistent.take the simple regression as an example Y=b0+b1 X+uWe know the OLS estimator of b1 is,The consequences of serial cor,The consequences of serial correlation(Autocorrelation),The R2 and adj-R2 are still consistent if the time series is stationary(thats r 1).Or else,for non-stationary time series,the R2 and adj-R2 may be invalid.,The consequences of serial cor,The consequences of serial correlation(Autocorrelation),OLS estimators will not be efficient.The variance of OLS estimators will be biased.,The consequences of serial cor,The consequences of serial correlation(Autocorrelation),t-statistics and F-statistic will be misleading when there are serial correlation in error terms ut.The variance and standard error of the predicted value will be invalid.,The consequences of serial cor,How to detect the serial correlation?,Time-sequence plotRuns testDurbin-Watson test,How to detect the serial corre,Time sequence plot,Time sequence plot,Example:Real wages and productivity(Example 10-1),Example:Real wages and produc,Runs test,First,get the sign of the residuals,et,for example,(-)(+)(-)(+)(-),that is,there are 9 negative signs,followed by 8 positive signs and so on.The same signs in the parentheses are called a run.Let N is the number of observations,and N1 is the number of positive signs of the residuals,and N2 is the number of negative signs.And k is the number of runs.,Runs testFirst,get the sign o,Runs test,Swed and Eisenhart give us a table of critical values.H0:the residual e is stochastic,that is,there is no serial correlation.How to test?If the number of run in your model is less than or equal the critical value n1(table A-6a),and larger than or equal to the critical value n2(A-6b),then we can reject the null hypothesis,H0,means there exists serial correlation.,Runs testSwed and Eisenhart gi,Runs test(example),If the signs of the residual is(-)(+)(-)(+)(-)9 8 4 2 3Then,N1=8+2=10,N2=9+4+3=16,N=26,k=5,then the critical value at 5%significance is 8 and 19.So,if the runs in our model 8 or 19,we should reject the null hypothesis H0.The number of runs in our model is 58,so we reject the H0,which mean there is serial correlation in our model.,Runs test(example)If the sign,Durbin-Watson Test,Durbin and Watson put forward an d statistic(DW).In most software,d-value will be provided with R2,adj-R2(Eviews),in STATA,using command tsset year/*to describe the data is time series*/estat dwatson/*must using after reg*/dwstat/*the out of dated command*/,Durbin-Watson TestDurbin and W,Durbin-Watson Test,There must be a intercept term in the regression model;It only can be used to detect the first order serial correlation.That is,ut=r ut-1+vt,-1r1.There is no lagged dependent variable as explanatory variable.Ct=b0+b1Yt+b2Ct-1+ut,Durbin-Watson TestThere must b,Durbin-Watson Test,We can rewrite the Durbin-Watson d-stat as,Durbin-Watson TestWe can rewri,Durbin-Watson Test,If the Durbin-Watson d-stat lies in(du,4-du),there is no serial correlation.If d4-dL,there are positive and negative serial correlation respectively.If dLddU,or 4-dUd4-dL,then we cant detect the serial correlation.,Durbin-Watson TestIf the Durbi,Durbin-Watson Test:Procedure,First regress Y on Xs,and get the residuals et.Calculate the DW d-stat.May be given by software.Given the number of observations n and the number of explanatory variables k,check the critical value dL and dU.Using the rule to judge whether there is serial correlation.,Durbin-Watson Test:ProcedureF,Real wages and productivity:DW test,Table 10_1.txtinsheet using“table 10_1.txt”,cleartsset yearreg rwage productdwstat or estat dwatsond=0.2137 n=44 k=1dL(44,1)=1.475 dU(44,1)=1.566ddL,so there exists positive correlation in et.,Real wages and productivity:D,Durbin-Watson Test:there is a lagged dependent variable,Ct=b0+b1Yt+b2Ct-1+utWhere there is a lagged dependent variable in the model,the Durbin-Watson h test can be used.H0:there is no serial correlation.d=0.8598,h=2.9092 Z0.05=1.645,reject H0.Stata command:estat durbinalt,Durbin-Watson Test:there is a,Corrections for serial correlation:Generalized differencing,Yt=b0+b1Xt+ut(1)If there is first-order serial correlation,that is,ut is AR(1)process.i.e.ut=r ut-1+vt,-1r1.Then the model for next period is Yt-1=b0+b1Xt-1+ut-1Multiple both sides,rYt-1=rb0+rb1Xt-1+rut-1(2)(1)-(2),Yt-rYt-1=(1-r)b0+b1(Xt-rXt-1)+(ut-rut-1),rewrite asYt*=b0*+b1Xt*+vt,where vt is no serial correlation.,Corrections for serial correla,Corrections for serial correlation,But we dont know r,first we need to estimate it.There are several method to estimate r.(1)If there are first-order serial correlation,i.e.ut=r ut-1+vt,-1r1.Then,we use model et=r et-1+vt to estimate r.(2)estimate it from Durbin-Watson d-stat,Corrections for serial correla,Example:real wage and productivity,First regress rwages on product,and get residuals eThen regress e on e_n-1 without constant,and get the estimate of r=0.8708Then transform to the new modelrwagest-0.87rwagest-1=b0*+b1(productt-0.87productt-1)+vtGet the estimation of the above equation,rwagest-0.87rwagest-1=5.47+0.569(productt-0.87productt-1),Example:real wage and product,Prais-Winsten transformation,Usually applied in small sample cases,take example 10.1 for instancereplace r=sqrt(1-0.87082)*rwages in 1replace p=sqrt(1-0.87082)*product in 1,Prais-Winsten transformationUs,Newey-West standard error,Newey-West standard error,Newey-West standard error,Newey-West standard error corrects serial correlation as well as heteroskedasticity.If option lag is set to zero,then NW standard error is equivalent to White robust standard error.newey rwages products,lag(0)reg rwages products,vce(robust),Newey-West standard errorNewey,Main Point in this Chapter,Serial correlation:cov(ui,uj)0,i.e.E(ui,uj)0 Concequence:OLS estimators will be still unbiased and consistentOLS estimators will not be efficient and variance of it is biased.t-statistics and F-statistic will be misleadingTest serial correlationTime-sequence plotDurbin-Watson testCorrection for serial correlation of AR(1)Generalize differencing.Newey West standard error,Main Point in this ChapterSeri,