hresiduals: Multi-Step Ahead In-Sample Residuals

View source: R/methods.R

hresiduals.tsissm.estimateR Documentation

Multi-Step Ahead In-Sample Residuals

Description

Extract the multi-step ahead in-sample residual values from an estimated model.

Usage

## S3 method for class 'tsissm.estimate'
hresiduals(
  object,
  h = 12,
  transformed = TRUE,
  index_start = 0,
  simplify = TRUE,
  ...
)

hresiduals(object, ...)

Arguments

object

an object of class “tsissm.estimate”.

h

the forecast horizon

transformed

residuals based values in transformed space (Box Cox).

index_start

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.

simplify

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.

Details

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.

Value

A data.table in either long or wide format.


tsissm documentation built on Aug. 8, 2025, 6:08 p.m.