Learn R Programming

tsissm (version 1.0.1)

predict.tsissm.estimate: Model Prediction

Description

Prediction function for class “tsissm.estimate” or “tsissm.selection”.

Usage

# S3 method for tsissm.estimate
predict(
  object,
  h = 12,
  seed = NULL,
  newxreg = NULL,
  nsim = 1000,
  forc_dates = NULL,
  innov = NULL,
  innov_type = "q",
  init_states = NULL,
  ...
)

# S3 method for tsissm.selection predict( object, h = 12, newxreg = NULL, nsim = 1000, forc_dates = NULL, init_states = NULL, ... )

Value

An object of class “tsissm.predict” which also inherits “tsmodel.predict”, with slots for the simulated prediction distribution, the original series (as a zoo object), the original specification object and the mean forecast. The predictive distribution is back transformed if lambda was not set to NULL in the specification. If the input class is “tsissm.selection”

then the returned class with be “tsissm.selection_predict” which hold the list of predicted objects. For this dispatch method, custom innovations are not allowed since correlated innovations are passed to each model predicted (using a Normal Copula) in order to enable ensembling of the simulated predictive distributions.

Arguments

object

an object of class “tsissm.estimate” or “tsissm.selection”.

h

the forecast horizon.

seed

an object specifying if and how the random number generator should be initialized (‘seeded’). Either NULL or an integer that will be used in a call to set.seed before simulating the response vectors.

newxreg

a matrix of external regressors in the forecast horizon.

nsim

the number of simulations to use for generating the simulated predictive distribution.

forc_dates

an optional vector of forecast dates equal to h. If NULL will use the implied periodicity of the data to generate a regular sequence of dates after the last available date in the data.

innov

an optional vector of innovations (see innov_type). The length of this vector should be equal to nsim x horizon.

innov_type

if ‘innov’ is not NULL, then this denotes the type of values passed, with “q” denoting quantile probabilities (default and backwards compatible) and “z” for standardized errors.

init_states

an optional vector of states to initialize the forecast and override the initial state vector. If NULL, will use the last available state from the estimated model.

...

not currently used.

Details

Like all models in the tsmodels framework, prediction is done by simulating h-steps ahead in order to build a predictive distribution.