I have built an ARIMA model in R with the "forecast" package's auto.arima() function. I want to simulate the ARIMA model with the same starting values as the original time series. For example, if my original time series has values from time 0 to time 2000, I want the ARIMA model to simulate the same time period (0 to 2000). If the ARIMA model is ARIMA(5,0,1), I want the values from time 0 to time 4 to be retained in the ARIMA model and the model simulates from that point on using those first 5 points.

I appreciate your help!

  • $\begingroup$ You may be interested in this post, which gives an example for an AR model. $\endgroup$ – javlacalle Jul 2 '15 at 20:10

Try this:

fit <- auto.arima(wineind)
lines(simulate(fit,future=FALSE), col='red')

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.