Is there yet a general way to forecast n steps ahead using timeseries models, like pm.AR ?
I thing that ideally there would be an ‘extra steps’ argument, or something similar to generate extra points beyond the end of the observed data for these models.
Or an accessible iterator function supplied by the ts class, which allowed stepping to be coded manually, given the necessary state.
I would like something that can be used in the main inference sampling as well as ppc. So far, I have tried a few approaches
(i) passing in a pandas series with padded nans at the end, as suggested here:
this looks like it should be a generic solution, but I get the error:
Automatic inputation is only supported for univariate RandomVariables. lk of type <class ‘pymc.distributions.timeseries.AutoRegressiveRV’> is not supported
(which I suspect should read imputation)
(ii) I tried also having two calls to pm.AR() in the model, the first including the observed data, and the second intended to carry on (forecasting n steps) where the first one left off. However, I could not figure out how to set up the latter correctly - because init_dist in the second call is not going to accept a tensor value passed out of the first call.
The only way that I have been able to get this to work so far, is to manually code an iterator function that steps the AR process forward separately from the pm.AR. this is obviously not ideal, as you end up having to recode the process which is inside the time-series distribution.
Thanks for any insights