A question about data prediction by ARIMA model

2 views (last 30 days)
Dear Sir or Madam:
I haven’t understood too much about time series analysis, but now I have to establish an appropriate model to predict data. The data is demonstrated in Fig 1.
Fig 1 According to the figure, I would like to establish a time series analysis model based on ARIMA. Therefore, I have to make sure that the figure is stationary. After testing the stationarity by Danial test, it shows that the data is not stationary and it is required to calculate the first order difference. After that ,the data proves to be stationary by Danial test. The results are shown in Fig 2.
Fig 2 Actually, I don’t know how could these data successfully be accepted as stationary data series through the Danial test considering the uneven fluctuation, which means some places are significantly larger than other places during the entire cycle. I am wondering whether this phenomena reflects the stationarity? Besides, I also have tried to test the stationarity by the run test. However, it turns out that the data is non stationary. Because it is calculating the difference all the time and finally it falls into an endless loop.
On the basis of the results which turns out as stationary data through through the Danial test, the time series model of the first order difference is fitted by ARMA(2,1) which has the smallest value after calculating AIC. However, when I calculate the residual value (e = resid(m,u);). The results are shown in Fig 3. Actually, when I refer to the explanation about resid function, I was wondering why the Fig 3 could be plotted, because the explanation says ‘with an output argument, no plot is produced.’ which is shown in Fig 4. Therefore, I can’t refer to the explanation for this figure.
Fig 3.
Fig 4.
The error between the original data and prediction is shown in fig 5.
Fig 5. Finally, when I test the residual value through Ligung-Box test, it turns out the results should not be accepted. I consulted some books and it suggests to change the model by adjusting the order of ARMA. But how could I adjust it? In fact, I am wondering whether the data is suitable to be fitted by ARIMA. Besides, I also upload my data as well as my programme to the attachment. If you have a well-programmed ARIMA prediction model, please check it out by your programme. If it is convenient to you, I would appreciate that you could seed me your programme.

Answers (0)

Categories

Find more on Conditional Mean Models in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!