Help System (web edition)

REGDIAG gives the value of the Durbin-Watson statistics for testing
the first order autocorrelation of residuals.
To get its P-value enter a specification DWN=<integer>
where <integer> must be at least 10000.
Then the P-value will be computed by simulation using <integer>
replicates.

Also higher-order autocorrelations can be tested by the same method.
By MAXLAG=k the order 1,2,...,k autocorrelations of residuals
will be tested by using the generalized DW statistics

sum [res(i)-res(i-j)]^2
D(j) = -----------------------
sum [res(i)]^2

where res(1),...,res(n) are the residuals of the estimated linear
regression model
Y = X*beta + eps
where X is the n*m design matrix and eps is N(0,sigma^2*I).
Then we have res=M*eps where M=I-X*inv(X'X)X'.

By making the SVD decomposition X=U*D*V' where U is a n*m matrix
the residuals can be computed by 2*m*n multiplications by
res=(I-U*U')*eps.

In randomized tests DWN replicates of D(j), j=1,2,...,k are
computed and the P values are obtained as the proportion of replicates
having a lower value than the original one.

By using RN specification instead of DWN the randomized tests
will be based on autocorrelations instead of DW values.

E = Estimating regression models with autocorrelated disturbances