residuals.tsissm.estimate | R Documentation |
Extract the residual values from an estimated model.
## S3 method for class 'tsissm.estimate' residuals( object, raw = FALSE, h = 1, seed = NULL, trace = FALSE, index_start = 1, ... )
object |
an object of class “tsissm.estimate”. |
raw |
raw residuals are the model based values in transformed space (when either Box Cox or Logistic have been used as transformatiions). |
h |
the horizon (steps) ahead residuals required. The default represents the standard residuals whilst for h>1 these are the (1:h)-step ahead in-sample predicted residuals for each time point under fixed coefficients. |
seed |
a seed value which initializes the simulated predictive distribution from which the h-step ahead forecasts are made in order to calculate the residuals. |
trace |
whether to show the progress bar for the h-step ahead residuals calculation. The user is expected to have set up appropriate handlers for this using the “progressr” package. |
index_start |
the numeric index of the series from which to start the evaluation (defaults to the first data point). For very large series, one may be interested in discarding earlier periods. |
... |
not currently used. |
For h>1, this is like performing an in-sample backtest starting at time 1 with fixed coefficients. The purpose of having the matrix of h-step ahead residuals is in order to calculate the 1:h covariance matrix as well as the cross 1:h covariance matrix when ensembling series at multiple horizons.
An xts vector of the model residuals for h = 1, else a data.table with rows representing the first prediction date and columns the h-ahead forecast residuals.
The function can use parallel functionality (for h>1) as long as the
user has set up a plan
using the future package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.