user1349407
user1349407

Reputation: 622

(R) Automatically calculate optimized Arima(p, d , q) value

I'm developing automatic forecast Software with JAVA & R. The following steps are used in R to forecast next 18 values:

  1. trends <- scan("c:/data_for_R/trends.dat")
  2. auto.arima(trends) (cf. arima(pdq))
  3. trendsarima <- arima(trends, order=c(2,1,3)), note that (2,1,3) was found by the step #2)
  4. trendsforecasts <- forecast.Arima(trendsarima, h=18)
  5. trendsforecasts
  6. plot.forecast(trendsforecasts)

All I want to know is, how do you integrate steps #2, #3 (preferably by a single command)?

Upvotes: 0

Views: 830

Answers (1)

Rob Hyndman
Rob Hyndman

Reputation: 31810

trendsarima <- auto.arima(trends)

Upvotes: 2

Related Questions