I don't see many posts here related to the library hts, but I'm hoping someone here is experienced in using the library for hierarchical forecasting. I am trying to apply the following code, which works with a normal ts object, using an hts object instead:
#Time series with period of 101 means fourier transform is the best way to deal with seasonality
data=ts(MyData,frequency=101)
fit <- auto.arima(data, xreg = fourier(data, K = 11),
seasonal = FALSE, lambda = 1)
When I do the same with an hts object, it won't accept the fourier transform as xreg, either applying fourier to the ts object:
MyData contains the bottom level series, while data.hts is the hierarchical time series object. future is just an empty matrix with the same attributes as what the future of MyData would look like. It is created only in order for fourier() to know how to construct the right matrix for the future periods.
The syntax is a little cumbersome. The new fable package is much better at handling this, but the documentation for hierarchical time series is still sparse (we are working on it).
Oh I see, I missed the distinction between xreg and newxreg! I had found a workaround doing the individual ARIMA's and then using combinef but this will allow me to test other methods as well. Thanks!