I want to make a model for predict the future values. I have a time series like this one series

So, I try to remove the trend (detrended) and with difference transform but nothing, I always have from the ADF test and KPSS test a values that indicate non-stationary dataset.

How can I do?

Sorry but the data was wrong, here is the correct data file: https://drive.google.com/open?id=1D0u9HwRnnkwH0bvaWGC-C59xpabua4u-

  • $\begingroup$ Welcome to Cross Validated! I find your title confusing. You want to remove nonstationarity, don't you? $\endgroup$ – Richard Hardy Mar 27 '20 at 16:07
  • $\begingroup$ there are a few ways to make a series stationary .. only your data and THE SHADOW (pun) knows... post your data and I will help you convert your non-stationary series (observed data) to a stationary series (error process from a useful model) . $\endgroup$ – IrishStat Mar 27 '20 at 16:58

First of all … you should ALWAYS model TIME SERIES i.e. bucketed data which is observed NOT what is accumulated UNLSS you wish to first bucket/accumulate transactional data to create a bucketed time series. The time series to be analyzed should never be an unneeded accumulation or an unneeded differencing.

The data you posted is here enter image description here , When you accumulated your data you injected non-stationarity (trend in this case) into your new series which you posted as a picture.

A useful model for the original data is obtained here containing the answer to your question. enter image description here . The evidence suggests that the non-stationarity in your observed data ( starting at 2016/4 ; 48 values ) is as follows:

1) there is a systematic seasonal pulse in December of each year (period 9) caused by an unspecified but latent exogenous deterministic effect possibly anthropogenic in nature.

2) there was a level shift DOWN at or about period 9 (2016/12)

3) there was 1 unusual activity DOWN at period 12 (2017/3)

4) there is significant positive correlation between observations 2 periods apart

I used AUTOBOX , which I have helped to develop, but essentially the analytical tools of Intervention Detection and arima model identification were simultaneously employed.

The residual plot is here enter image description here and the acf of the residuals suggesting sufficiency of the model is here enter image description here

The Actual/Fit and Forecast graph is here enter image description here providing integer forecasts and forecast intervals for the next 12 periods.


It depends if the non-stationarity is stocastic or deterministic. Most analysis focus on the former although solving for one won't solve the problem if you have the other. Differencing is the common way to deal with stocastic non-stationarity. Your data is obviously non-stationary.

  • $\begingroup$ Yes, It's stochastic but differencing isn't the solution. $\endgroup$ – mattew89 Mar 28 '20 at 7:22
  • $\begingroup$ All the accounts I have read in texts suggest differencing to remove stochastic non-stationarity. So once more there is disagreement among experts. :) Admittedly most of my readings are from ARIMA, and they do suggest logging to deal with change in variation. $\endgroup$ – user54285 Mar 28 '20 at 22:21
  • $\begingroup$ please look at stats.stackexchange.com/questions/18844/… for a thorough discussion of dealing with evidence of non-constant variance..autobox.com/pdfs/vegas_ibf_09a.pdf presents a discussion of why there is no need to take a log xform for the classic airline series. Transformations are like drugs .. some are good for you and some not so good .. Introductory material is ALWAYS introductory and often are just a starting point … $\endgroup$ – IrishStat Mar 29 '20 at 11:05
  • $\begingroup$ I was not disagreeing (I am not an expert just a practitioner). I was stating what one finds in many sources. I find it distressing since I am not an expert there is so much disagreement (or if one prefers bad advice since I do what the advice I find says and then others say, that is bad advice). I don't think this is just introductory advice, it is said a lot. $\endgroup$ – user54285 Mar 29 '20 at 21:01

One common way to address non-stationarity is to take differences. Another (perhaps simpler) try you could do first is to take the log of your series. ADF test is your best friend. Also look at the ACF and PACF to get insights on the nature of the data before modeling time series.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.