Formula:
The Durbin Watson (DW) test statistic is calculated using the following formula:
d = Σ(et - et-1)2 ⁄ Σ(et2)
- d: The Durbin Watson test statistic.
- et: The residual at observation (time period) t.
- et-1: The residual at the previous observation (time period) t-1.
- Σ: Summation over all observations from t=2 to T (where T is the total number of observations).
The statistic ranges from 0 to 4. A value around 2 indicates no autocorrelation, while values closer to 0 suggest positive autocorrelation and values closer to 4 suggest negative autocorrelation.