1

When use KPSS to test the stationarity of data series I get this warning .Does it affect the final results?

C:\Users\\site-packages\statsmodels\tsa\stattools.py:2022: InterpolationWarning: The test statistic is outside of the range of p-values available in the
look-up table. The actual p-value is greater than the p-value returned.

warnings.warn( KPSS Statistic: 0.004941999429937412 p-value: 0.1 num lags: 110 Critial Values: 10% : 0.347 5% : 0.463 2.5% : 0.574 1% : 0.739 Result: The series is stationary

ayla
  • 177
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 10 '22 at 02:52
  • When I use the KPSS testing with the output I got on this warnings why? – ayla Jul 10 '22 at 08:35
  • Could you tell us what you mean by "final results"? That will determine whether this warning is problematic or not. – whuber Jul 10 '22 at 16:15
  • I mean this "Result: The series is stationary" – ayla Jul 11 '22 at 17:45

1 Answers1

1

The KPSS statistic is a (LM-type) test statistic that rejects for large values (you can for example infer that from the fact that the smaller the level, the larger the critical value) of the test statistic. Hence, quantiles in the right tail and small p-values are of interest.

These however arise from a nonstandard distribution derived by KPSS and are found via stochastic simulation, so we cannot as easily produce critical or p-values as we can for, say, a normally distributed statistic by just invoking qnorm or pnorm. (The idea is similar to that for unit root tests, see e.g. How is the augmented Dickey–Fuller test (ADF) table of critical values calculated?)

However, given that we know that your test statistic is (way) smaller than the 10% critical value, we know that your p-value is (way) bigger than 10%. So, unless you were willing to reject at a nominal level (way) larger than 10% (and basically nobody is), you know that you cannot reject the null, and that likely is all you want to know from running the test. (It would for example be a problem if you were to use p-values further in, say, meta-analyses such as those discussed in Can a meta-analysis of studies which are all "not statistically signficant" lead to a "significant" conclusion?, for which you of course need more precise p-values.)

So your final result is not affected, I suppose.

  • OK, thanks, the size of my dataset is 60000. I thought the kpss test didn't deal with large volumes. – ayla Jul 11 '22 at 17:51
  • I unfortunately do not see how sample size is related to what we are discussing here. Can you elaborate? – Christoph Hanck Jul 12 '22 at 05:12
  • "The KPSS statistic is a (LM-type) test statistic that rejects for large values (you can for example infer that from the fact that the smaller the level, the larger the critical value)." Is that mean I can not use kpss with large samples? – ayla Jul 12 '22 at 07:19
  • No, I meant "for large values of the test statistic", I made an edit. That is unrelated to large sample sizes. – Christoph Hanck Jul 12 '22 at 07:23
  • In general, since all these tests' null distributions are based on asymptotic considerations, it is, if anything, good to have a large sample size so that the asymptotic approximation can be considered to work well. – Christoph Hanck Jul 12 '22 at 07:58