simulate.ets {forecast} | R Documentation |
Returns a time series based on the model object object
.
## S3 method for class 'ets': simulate(object, nsim=length(object$x), seed=NULL, initstate=object$state[1,], bootstrap=TRUE, ...)
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. |
An object of class "ts
".
Rob J Hyndman
fit <- ets(USAccDeaths) plot(simulate(fit, 100))