3
$\begingroup$

Let's say in linear regression, I got a fit and I can plot residuals to see whether there is any systematic trend in such a plot. How to quantitatively determine whether the residues are really random? Is Durbin-Watson test used for this purpose? How to interpret such test if so?

Please provide an example, preferably in R.

$\endgroup$
2

1 Answer 1

2
$\begingroup$

This also depends on the type of data you have. Do you have a time series? Then looking at a ACF/PACF plot of the residuals may be one way of determining if these are white noise:

require(tseries)
tsdiag(rnorm(100))

you may find this PDF helpful.

If you have cross-section data an inspection of the residual plots yields very valuable information in my opinion:

data(cars)
plot(lm(speed~dist, data=cars))

There exist tests (see comments) but I very often find graphs more useful.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.