White Test
White Test
Overview
Definition
The White Test is a general statistical test used to detect heteroscedasticity in a regression model. Unlike the Breusch-Pagan test, it does not assume any specific form of heteroscedasticity, making it more robust but also less powerful in specific cases.
1. Procedure
- Obtain OLS residuals
. - Run auxiliary regression of squared residuals
on: - All original predictors (
). - The squared terms (
). - The cross-products (
).
- All original predictors (
- Compute
from this auxiliary regression.
2. Comparison: White vs. Breusch-Pagan
| Feature | Breusch-Pagan | White Test |
|---|---|---|
| Assumed Form | Linear function of X | General (Quadratic/Interaction) |
| Sensitivity | Linear Heteroscedasticity | Non-linear Heteroscedasticity and Specification Error |
| Degrees of Freedom | Lower ( |
High ( |
| Power | Higher (if linear) | Lower (due to high df) |
3. Python Implementation Example
from statsmodels.stats.diagnostic import het_white
lm, lm_p, f, f_p = het_white(model.resid, model.model.exog)
print(f"White Test p-value: {lm_p:.4f}")
4. Related Concepts
- Breusch-Pagan Test - Alternative heteroscedasticity test.
- Multiple Linear Regression - Framework.
- Weighted Least Squares (WLS) - Remediation.