Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. library(forecast)
  2. x <- AirPassengers
  3. mod_arima <- auto.arima(x, ic='aicc', stepwise=FALSE)
  4. mod_exponential <- ets(x, ic='aicc', restrict=FALSE)
  5. mod_neural <- nnetar(x, p=12, size=25)
  6. mod_tbats <- tbats(x, ic='aicc', seasonal.periods=12)
  7. par(mfrow=c(4, 1))
  8. plot(forecast(mod_arima, 12), include=36)
  9. plot(forecast(mod_exponential, 12), include=36)
  10. plot(forecast(mod_neural, 12), include=36)
  11. plot(forecast(mod_tbats, 12), include=36)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement