I have a time series and fitted an AR(I)MA object (I really just want an ARMA process so the order is (p,0,q)) in R. Now I'd like to "continue" that process (I guess what I mean is perform simulations).

I found arima.sim() but I'm not sure how to get it to use my existing time series (that I'd like to "continue").

I hope my question makes sense!


  • 2
    $\begingroup$ I think that the word you're looking for is forecasting. $\endgroup$
    – johnny
    Dec 3, 2012 at 8:14

1 Answer 1

fit <- Arima(x,order=c(p,0,q))
newx <- simulate(fit,nsim=100)
  • $\begingroup$ Thank you, that seems to be exactly what I was looking for! $\endgroup$
    – Lucas
    Dec 3, 2012 at 10:20
  • $\begingroup$ Is there a way to specify the distribution / standard deviation for the white noise process? $\endgroup$
    – Lucas
    Dec 3, 2012 at 10:31
  • $\begingroup$ The default is a normal distribution with sd equal to the sd of the residuals. You can change the latter by altering the value of fit$sigma2. It is also possible to use a bootstrap distribution of the residuals by setting bootstrap=TRUE. $\endgroup$ Dec 3, 2012 at 21:33
  • $\begingroup$ Thanks for the reply! How would I go about changing the distribution itself (say to a t distribution)? $\endgroup$
    – Lucas
    Dec 4, 2012 at 19:20
  • $\begingroup$ Write your own version of the simulate.Arima function. $\endgroup$ Dec 4, 2012 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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