simulate.sarimaTD: Simulate predictive trajectories from a SARIMA model with...

Description Usage Arguments Value

View source: R/prediction.R

Description

This function does a few things worth noting. It 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_sarima function.

Usage

1
2
## S3 method for class 'sarimaTD'
simulate(object, nsim = 1, seed = NULL, newdata, h = 1)

Arguments

object

a sarima fit of class "sarima_td", as returned by fit_sarima

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

newdata

numeric vector of new data to simulate forward from

h

number of time steps forwards to simulate

Value

an nsim by h matrix with simulated values


reichlab/sarima-utils documentation built on March 21, 2020, 3:45 a.m.