Closed AgentRichi closed 1 year ago
Thanks for raising this, currently this is the intended behaviour however I can see how this can be surprising.
The reason why this is intended is because the transformation parameters are allowed to vary over time. Storing the transformation parameter(s) at the time of estimating the model would not allow them to be updated, so we seek them out when producing a forecast()
. The recommended (but rarely used) practice is to keep any transformation parameters inside the dataset you are using, which is useful if you need a different parameter for different series in the same dataset.
This issue is more appropriate for the fabletools package, and I've created an issue referencing this one for you: https://github.com/tidyverts/fabletools/issues/378
When using a custom transformation as per 13.3 Ensuring forecasts stay within limits and defining an
upper
andlower
limit as variables, theforecast
method (and likely other methods too) will look for these variables in the global environment when it is called.This means that if the variables have changed since the model was fit, for example because another timeseries was fit using a different set of limits, the
forecast
method will incorrectly scale the forecasted values, without giving a user error/warning.See example below.