KPSS test
Time series · reference distribution: η (tabulated)
When to use it
Check the stationarity of a series with the null hypothesis reversed relative to the ADF; the two together complement each other.
Null hypothesis
The series is stationary.
Assumptions
- Choose the window of the long-run variance
Test statistic
\eta = \dfrac{1}{n^2} \dfrac{\sum_t S_t^2}{\hat{\sigma}^2}How to report it
KPSS = 0.21, p > .10: does not reject stationarity
In R and Python
R
library(tseries)
kpss.test(series)
Python
from statsmodels.tsa.stattools import kpss
kpss(series)
In Python, stats is scipy.stats and np is numpy.
Variants and alternatives
Where it sits in the catalog
Time series. For observations ordered in time, where neighboring values tend to be correlated: they test stationarity and autocorrelation.
In the decision tree
It has no path of its own in the tree, but appears alongside other tests:
- As an alternative to Augmented Dickey-Fuller.