dwtest - Durbin-Watson test

Syntax

[P,DW] = dwtest(R,X)
[...] = dwtest(R,X,method)
[...] = dwtest(R,X,method,tail)

Description

[P,DW] = dwtest(R,X) performs a Durbin-Watson test on the vector R of residuals from a linear regression, where X is the design matrix from that linear regression. P is the computed p-value for the test, and DW is the Durbin-Watson statistic. The Durbin-Watson test is used to test if the residuals are independent, against the alternative that there is autocorrelation among them.

[...] = dwtest(R,X,method) specifies the method to be used in computing the p-value. method can be either of the following:

[...] = dwtest(R,X,method,tail) performs the test against the alternative hypothesis specified by tail:

'both'

Serial correlation is not 0.

'right'

Serial correlation is greater than 0 (right-tailed test).

'left'

Serial correlation is less than 0 (left-tailed test).

See Also

regress

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS