predict.simple_ts: Generate predictions from a model fit with class simple_ts

View source: R/prediction.R

predict.simple_tsR Documentation

Generate predictions from a model fit with class simple_ts

Description

This function linearly interpolates missing values on the interior of the time series, which is necessary for some model fits with moving average components. It also handles transformations and possible seasonal differencing that may have been done in the fit_simple_ts function.

Usage

## S3 method for class 'simple_ts'
predict(simple_ts_fit, newdata = NULL, horizon = 1, nsim = 1, seed = NULL, ...)

Arguments

newdata

numeric vector of new data to simulate forward from

horizon

number of time steps forwards to simulate

nsim

number of sample trajectories to simulate

seed

either NULL or an integer that will be used in a call to set.seed before simulating the response vectors. If set, the value is saved as the "seed" attribute of the returned value. The default, NULL, will not change the random generator state, and return .Random.seed as the "seed" attribute

...

other arguments passed on to model-specific predict methods

object

a model fit of class "simple_ts", as returned by fit_simple_ts

Value

an nsim by horizon matrix with simulated values


reichlab/simplets documentation built on Sept. 16, 2024, 10:24 p.m.