Methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling.
The R package forecast provides methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling. You can install the stable version from CRAN.
install.packages('forecast', dependencies = TRUE)
You can install the development version from Github
# install.packages("devtools")devtools::install_github("robjhyndman/forecast")
library(forecast)library(ggplot2) # ETS forecastsUSAccDeaths %>% ets() %>% forecast() %>% autoplot() # Automatic ARIMA forecastsWWWusage %>% auto.arima() %>% forecast(h=20) %>% autoplot() # ARFIMA forecastslibrary(fracdiff)x <- fracdiff.sim( 100, ma=-.4, d=.3)$seriesarfima(x) %>% forecast(h=30) %>% autoplot() # Forecasting with STLUSAccDeaths %>% stlm(modelfunction=ar) %>% forecast(h=36) %>% autoplot() AirPassengers %>% stlf(lambda=0) %>% autoplot() USAccDeaths %>% stl(s.window='periodic') %>% forecast() %>% autoplot() # TBATS forecastsUSAccDeaths %>% tbats() %>% forecast() %>% autoplot() taylor %>% tbats() %>% forecast() %>% autoplot()
This package is free and open source software, licensed under GPL-3.