Autocorrelation (Durbin-Watson)

What Autocorrelation Tests Check

Autocorrelation tests detect whether model residuals are correlated with their own past values. In time series data (which is typical in MMM), autocorrelated residuals indicate that the model hasn't fully captured temporal patterns.

Purpose: Checks if residuals are correlated with previous time periods, ensuring the independence assumption is satisfied.

Why Autocorrelation Matters

When residuals have no autocorrelation:

Standard Errors are Accurate: Coefficient standard errors correctly reflect uncertainty

Hypothesis Tests are Valid: P-values and confidence intervals have correct coverage

Model is Complete: All systematic temporal patterns have been captured

Autocorrelated residuals suggest the model is missing time-dependent effects, leading to overconfident (too narrow) standard errors and unreliable hypothesis tests.

Statistical Tests Available

MixModeler provides three autocorrelation tests:

Test
Description
Interpretation

Durbin-Watson Test

Tests for first-order autocorrelation (lag 1)

DW ≈ 2 is ideal; < 1.5 or > 2.5 indicates problems

Breusch-Godfrey Test

More general test for higher-order autocorrelation

p < 0.05 indicates autocorrelation present

Ljung-Box Test

Tests for autocorrelation at multiple lags

p < 0.05 indicates autocorrelation present

Durbin-Watson Statistic Interpretation

The Durbin-Watson (DW) statistic ranges from 0 to 4:

DW Range
Interpretation
Action

< 1.5

Positive autocorrelation

Add lagged variables or time trends

1.5 - 2.5

No significant autocorrelation

✓ Assumption satisfied

> 2.5

Negative autocorrelation (rare)

Check for model misspecification

Ideal Value: DW ≈ 2 indicates no autocorrelation

Positive autocorrelation (DW < 2): Current period residuals are similar to previous period residuals - most common issue in time series

Negative autocorrelation (DW > 2): Current period residuals are opposite to previous period residuals - unusual and may indicate over-differencing

Visual Diagnostics

MixModeler provides visualizations to detect autocorrelation:

Autocorrelation Function (ACF) Plot:

  • Shows correlation between residuals and lagged residuals

  • Good: All lags within confidence bounds (shown as dashed lines)

  • Problem: Spikes outside confidence bounds indicate significant autocorrelation

Residuals Over Time Plot:

  • Time series plot of residuals

  • Good: Random scatter around zero with no visible patterns

  • Problem: Cyclical patterns, trends, or clustering

Confidence Bounds: Typically set at ±1.96/√n, representing 95% confidence intervals

Interpreting Test Results

Passed Tests (✓)

What it means: No significant autocorrelation detected

  • Durbin-Watson near 2 (typically 1.5-2.5)

  • Breusch-Godfrey p-value ≥ 0.05

  • ACF plot shows most lags within confidence bounds

Implications:

  • Residuals are independent across time periods

  • Standard errors are reliable

  • Model has captured temporal patterns adequately

Action: No action needed - independence assumption is satisfied

Failed Tests (⚠)

What it means: Autocorrelation detected in residuals

Implications:

  • Standard errors may be too small (overconfident)

  • P-values may be overstated (variables appear more significant than they are)

  • Model predictions may be biased

Common Causes:

  • Missing lagged effects of marketing variables

  • Omitted seasonal or trend components

  • Persistence in dependent variable not modeled

  • Wrong functional form (e.g., linear when should be non-linear)

What to Do When Tests Fail

If autocorrelation tests fail, try these solutions:

1. Add Lagged Variables (Most Common Solution)

  • Include lagged values of the dependent variable

  • Add lagged marketing variables

  • Consider adstock transformations with higher decay rates

2. Include Time Trends

  • Add linear or quadratic time trend

  • Include monthly or quarterly dummy variables

  • Model seasonality explicitly

3. Add Omitted Variables

  • Include variables that capture temporal persistence

  • Add external factors that vary over time (e.g., macroeconomic indicators)

  • Consider competitive activity or market dynamics

4. Use Different Model Specification

  • Try different adstock parameterizations

  • Consider distributed lag models

  • Explore autoregressive structures

5. When Autocorrelation is Acceptable

  • Mild autocorrelation (DW between 1.3-1.5 or 2.5-2.7)

  • Focus is on prediction rather than hypothesis testing

  • Business insights are robust to minor violations

  • Using robust standard errors in analysis

Practical Guidelines

Acceptable Scenarios:

  • Slight autocorrelation with DW between 1.3 and 2.7

  • Weekly data with minor persistence

  • Large sample sizes where effect on inference is minimal

Critical Issues:

  • DW < 1.0 or > 3.0 (severe autocorrelation)

  • Multiple lags showing significant autocorrelation in ACF plot

  • Clear cyclical or trending patterns in residual plots

  • Using model for forecasting (autocorrelation severely biases predictions)

Example Interpretation

Scenario 1 - Passed:

  • Durbin-Watson: 1.95

  • Breusch-Godfrey p-value: 0.42

  • ACF plot: All lags within confidence bounds

Interpretation: No significant autocorrelation detected. The independence assumption is satisfied, and standard errors are reliable.

Scenario 2 - Mild Autocorrelation:

  • Durbin-Watson: 1.35

  • Breusch-Godfrey p-value: 0.03

  • ACF plot: Lag 1 slightly outside bounds

Interpretation: Mild positive autocorrelation detected. Consider adding a lagged dependent variable or checking adstock specifications. The violation is moderate and may be acceptable depending on business use case.

Scenario 3 - Severe Autocorrelation:

  • Durbin-Watson: 0.85

  • Breusch-Godfrey p-value: < 0.001

  • ACF plot: Multiple lags significantly outside bounds

Interpretation: Severe positive autocorrelation. The model is missing important temporal dynamics. Add lagged variables, time trends, or reconsider model specification before using for business decisions.

Marketing Mix Modeling Context

In MMM, autocorrelation often indicates:

Incomplete Adstock Modeling: Marketing effects may persist longer than captured

Missing Baseline Trends: Organic growth or decay not fully modeled

Seasonal Patterns: Regular cyclical patterns not accounted for

Competitive Dynamics: Reaction to competitor activity not included

After reviewing autocorrelation:

  • Check Residual Normality as autocorrelation can affect normality tests

  • Review Actual vs Predicted to see if temporal patterns are visible

  • Examine Variable Testing to optimize adstock parameters

Last updated