[R] help with durbin.watson

John Fox jfox at mcmaster.ca
Mon Jul 28 23:48:09 CEST 2008


Dear Tom,

It is in principle possible for residuals to be autocorrelated even when the
series for the response variable is not. Moreover, the DW test should be
appropriate for the model you fit. On the other hand, a DW statistic of 0
suggests perfect positive autocorrelation, and so I would suspect that
something has gone wrong. Without the data, it's not possible to be more
specific. If you haven't already looked at the residuals, I'd do so now.

Regards,
 John

------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of tom soyer
> Sent: July-27-08 4:33 PM
> To: r-help at r-project.org
> Subject: [R] help with durbin.watson
> 
> Hi,
> 
> I have two time series, y and x. Diff(y) and Diff(x) both show no
> autocorrelation. But durbin.watson(lm(Diff(y)~lag(Diff(x),k=-4)) gives a
DW
> value of zero. How come the residule is autocorrelated while Diff(y) and
> Diff(x) are not? Does anyone know if in my case a DW of zero indicates
> serial correlation, or is it telling me that the DW statistics is not the
> appropriate statistics to use here?
> 
> Thanks,
> 
> --
> Tom
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list