Extract the multi-step ahead in-sample residual values from an estimated model.
# S3 method for tsissm.estimate
hresiduals(
object,
h = 12,
transformed = TRUE,
index_start = 0,
simplify = TRUE,
...
)hresiduals(object, ...)
A data.table in either long or wide format.
an object of class “tsissm.estimate”.
the forecast horizon
residuals based values in transformed space (Box Cox).
the time point from which to initiate the in-sample rolling forecasts. This is zero based to enable the first forecast to be t=1.
whether to return a matrix type data.table of error against date and horizon, else the long for data.table with the forecasts, actuals and errors.
not currently used.
For each time point t (t>=index_start), in the data sample, an h-steps ahead forecast (predicting the observation at time t + h) is made, using the full sample estimated parameters and observed data up to t. These h-step-ahead fitted residuals, in either transformed or untransformed space, can sometimes be used for diagnosing the multi-step ahead in-sample performance of the model. This is not a substitute for a proper rolling out of sample forecast, but a quick method which may still be useful.