Created
July 17, 2019 13:26
-
-
Save erichare/16a6ca1b43fa6ce590bdcc4e9f4d443a to your computer and use it in GitHub Desktop.
Sample code to forecast Air Passengers using the Fable package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(fable) | |
fable_series <- AirPassengers %>% | |
as_tsibble() %>% | |
model( | |
ets = ETS(box_cox(value, 0.3)), | |
arima = ARIMA(value), | |
snaive = SNAIVE(value) | |
) %>% | |
forecast(h = "2 years") | |
autoplot(fable_series) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment