Closed amarchin closed 7 years ago
Strange, I thought I remembered "hts" supporting custom functions, but it looks like it only allows ETS, ARIMA, and RW models.
@earowang is this correct?
The forecast
function in hts
does support user-defined functions. It's a bug in the hts
package due to the use of xreg
argument. hybridModel
currently works without the external regressors.
In order to work around the issue, I would use hybridModel
for each hierarchical series and then use combinef()
to reconcile the forecasts. Please check out the examples in the combinef()
documentation.
Thanks for the answer, I wasn't aware of the combinef()
function. I think this workaround can solve my problem.
I was trying to use forecastHybrid with hierarchical time series and external regressors but I cannot figure out how to do that. I am trying in this way:
But I got the following error:
Error in forecast.Arima(object$auto.arima, h = h, xreg = xreg, level = level) : No regressors provided