Hi Matteo,

just use forecast.Arima() with h=2 to get forecasts up to 2 steps ahead. R will automatically use forecast.Arima() if you call forecast() with an Arima object.

library(forecast)
model <- auto.arima(AirPassengers)
forecast(model,h=2)

HTH,
Stephan


Matteo Bertini schrieb:
Hello everyone,

I'm doing some benchmark comparing Arima [1] and SVR on time series data.

I'm using an out-of-sample one-step-ahead prediction from Arima using
the "fitted" method [2].

Do someone know how to have a two-steps-ahead forecast timeseries from Arima?


Thanks,
Matteo Bertini

[1] http://robjhyndman.com/software/forecast
[2] AirPassengers example on page 5

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to