In R, I have loaded the built-in time series: AirPassengers and split it in train- and testdata like this:
rm(list = ls())
data = AirPassengers
traindata = ts(data[1:(0.75*length(data))], frequency = 12)
testdata = ts(data[((0.75*length(data))+1):length(data)], frequency = 12)
from here I want to estimate future values of a time series with the traindata using the Grey-Markov method. I know the Grey-Markov method consist of a Grey GM(1, 1) forecasting model followed by a Markov chain forecasting model refinement. But is there a function in R that performs this Grey-Markov method on its own, just like, for example, the auto.arima function?
No one has answered my question, so I thought I'll try to code a solution based on an example and found some minor different results but I don't think that my code is wrong. I hope that this method will help someone in the future. Also, I'd like to hear if someone finds errors in my code, than I'll change this.
The example I used is the example out of the following article:
Zhan-Li, M., & Jin-Hua, S. (2011b). Application of Grey-Markov Model in Forecasting Fire Accidents. Procedia Engineering, 11, 314–318. https://doi.org/10.1016/j.proeng.2011.04.663