Suppose I have a time-series data which I want to apply ARFIMA model to. I want to calculate the parameters automatically, as it is done in auto.arima
function. What I figured out so far is to find the order of fractional differentiation d
, differentiate the time series using d
, then apply auto.arima
and make forecast.
Here's the code I'd go with:
d <- fdGPH(ts_data)
ts_diff <- diffseries(ts_data, d = d)
fit <- auto.arima(ts_diff)
fc <- forecast(fit , h = 96)
The problem is that my forecast is related to differentiated data, not the original one. Is there way to 'undifferentiate' the series (fractionally) as the differentiation here means the expansion to binomial series?
I know that there is function arfima
in forecast package where author claims that it combines fracdiff
and auto.arima
package, but in my case it gives no sensible result - the forecast is almost constant.