simulate.ets {forecast}R Documentation

Simulation from an ETS model

Description

Returns a time series based on the model object object.

Usage

## S3 method for class 'ets':
simulate(object, nsim=length(object$x), seed=NULL, initstate=object$state[1,], bootstrap=TRUE, ...)

Arguments

object An object of class "ets". Usually the result of a call to ets.
nsim Number of periods for the simulated series
seed Either NULL or an integer that will be used in a call to set.seed before simulating the time seriers. The default, NULL will not change the random generator state.
initstate State at time 0.
bootstrap If TRUE, simulation uses resampled errors rather than normally distributed errors.
... Other arguments.

Value

An object of class "ts".

Author(s)

Rob J Hyndman

See Also

ets

Examples

fit <- ets(USAccDeaths)
plot(simulate(fit, 100))

[Package forecast version 1.23 Index]