predict.sparsecoint: Predict using a model of class sparsecoint.

predict.sparsecointR Documentation

Predict using a model of class sparsecoint.

Description

Predict using a model of class sparsecoint.

Usage

## S3 method for class 'sparsecoint'
predict(x, h = 1, exo = NULL, samples = FALSE, PI = 0.95, error = 0)

Arguments

x

The sparsecoint model object.

h

The prediction horizon.

exo

Exogenous data to use for the prediction, must be a matrix of size h*exo_k.

samples

The number of samples to obtain for prediction intervals, default is FALSE which means no samples.

PI

The level of the prediction intervals to create, default is 0.95.

error

Error term to add to the predictions, used when creating samples. Should only be used internally.

Value

A prediction of length h, possibly including samples and prediction intervals.


jonlachmann/sparsecoint documentation built on April 14, 2022, 10:49 a.m.