predict: Model Prediction

predict.tsets.estimateR Documentation

Model Prediction

Description

Prediction function for class “tsets.estimate”.

Usage

## S3 method for class 'tsets.estimate'
predict(
  object,
  h = 12,
  newxreg = NULL,
  nsim = 1000,
  forc_dates = NULL,
  innov = NULL,
  custom_slope = NULL,
  init_states = NULL,
  innov_type = "q",
  sigma_scale = NULL,
  ...
)

Arguments

object

an object of class “tsets.estimate”.

h

the forecast horizon.

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 uniform innovations which will be translated to regular innovations using the appropriate distribution quantile function and model standard deviation. The length of this vector should be equal to nsim x horizon.

custom_slope

either a vector of length equal to the horizon or 1. This will be used to override the slope state with a user provided set of values (or strong views on growth). Only allowed for AA or MM type models (i.e. no MA type).

init_states

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

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.

sigma_scale

a vector of length h denoting a scaling factor which is applied to rescale the standard deviation of each simulated horizon's distribution.

...

not currently used.

Details

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

Value

An object of class “tsets.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.


tsmodels/tsets documentation built on Oct. 8, 2022, 9:15 a.m.