Re: [R] Error Using dwtest

About this list Date view Thread view Subject view Author view Attachment view

From: Achim Zeileis (zeileis@ci.tuwien.ac.at)
Date: Thu 05 Jun 2003 - 21:54:50 EST


Message-id: <200306051154.h55BsoSC012361@thorin.ci.tuwien.ac.at>

On Wednesday 04 June 2003 16:44, rwatkins@cornerstonelp.com wrote:

> Hello all-
> I have two time series, Index1stdiff and Comps1stdiff. I regressed
> the first on the second and R returned the summary stats I expected.
> Then I looked at and plotted the residuals. I then wanted to
> assess autocorrelation characteristics and tried to run a
> Durbin-Watson using:
>
> library(lmtest)
>
> dwtest(formula=Index1stdiff~Comps1stdiff,alternative=c("greater"))
>
> I am getting the following error:
>
> Error in solve.default(crossprod(X), tol = tol) :
> Lapack routine dgesv: system is exactly singular
>
> Can anyone assess why my attempt crashes? I tried this earlier on
> what I thought was similar data and was returned an answer for "d"
> and a "p-value".

It means that the cross product X'X of your model matrix X, which is
computed by

  X <- model.matrix(formula, data = data)

is exactly singular and thus cannot be inverted. In such a case
dwtest() cannot compute the p value. You might want to try
durbin.watson() in the package car which uses a different approach for
computing the p value.
Best,
Z

> Thanks in advance for your assistance.
> Rick
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:52 EST