residuals: Model Residuals

residuals.tsissm.estimateR Documentation

Model Residuals


Extract the residual values from an estimated model.


## S3 method for class 'tsissm.estimate'
  raw = FALSE,
  h = 1,
  seed = NULL,
  trace = FALSE,
  index_start = 1,



an object of class “tsissm.estimate”.


raw residuals are the model based values in transformed space (when either Box Cox or Logistic have been used as transformatiions).


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.


a seed value which initializes the simulated predictive distribution from which the h-step ahead forecasts are made in order to calculate the residuals.


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.


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.

tsmodels/tsissm documentation built on June 22, 2022, 6:57 a.m.