durbinWatsonTest: Durbin-Watson Test for Autocorrelated Errors
Description
Computes residual autocorrelations and generalized Durbin-Watson
statistics and their bootstrapped p-values. dwt is an
abbreviation for durbinWatsonTest.
# S3 method for default
durbinWatsonTest(model, max.lag=1, ...)
# S3 method for durbinWatsonTest
print(x, ...)
Arguments
model
a linear-model object, or a vector of residuals from a linear model.
max.lag
maximum lag to which to compute residual autocorrelations
and Durbin-Watson statistics.
simulate
if TRUE p-values will be estimated by bootstrapping.
reps
number of bootstrap replications.
method
bootstrap method: "resample" to resample from the observed
residuals; "normal" to sample normally distributed errors with 0 mean
and standard deviation equal to the standard error of the regression.
alternative
sign of autocorrelation in alternative hypothesis; specify
only if max.lag = 1; if max.lag > 1, then alternative is
taken to be "two.sided".
…
arguments to be passed down.
x
durbinWatsonTest object.
Value
Returns an object of type "durbinWatsonTest".
References
Fox, J. (2008)
Applied Regression Analysis and Generalized Linear Models, Second Edition. Sage.