forecast v8.2

0

Monthly downloads

0th

Percentile

Forecasting Functions for Time Series and Linear Models

Methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling.

Readme

forecast

Travis-CI Build Status CRAN_Status_Badge Downloads Licence

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.

Installation

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")

Usage

library(forecast)
library(ggplot2)

# ETS forecasts
USAccDeaths %>%
  ets %>%
  forecast %>%
  autoplot

# Automatic ARIMA forecasts
WWWusage %>%
  auto.arima %>%
  forecast(h=20) %>%
  autoplot

# ARFIMA forecasts
library(fracdiff)
x <- fracdiff.sim( 100, ma=-.4, d=.3)$series
arfima(x) %>%
  forecast(h=30) %>%
  autoplot

# Forecasting with STL
USAccDeaths %>%
  stlm(modelfunction=ar) %>%
  forecast(h=36) %>%
  autoplot

AirPassengers %>%
  stlf(lambda=0) %>%
  autoplot

USAccDeaths %>%
  stl(s.window='periodic') %>%
  forecast %>%
  autoplot

# TBATS forecasts
USAccDeaths %>%
  tbats %>%
  forecast %>%
  autoplot

taylor %>%
  tbats %>%
  forecast %>%
  autoplot

For more information

License

This package is free and open source software, licensed under GPL-3.

Functions in forecast

Name Description
BoxCox Box Cox Transformation
autolayer Create a ggplot layer appropriate to a particular data type
croston Forecasts for intermittent demand using Croston's method
dm.test Diebold-Mariano test for predictive accuracy
forecast Forecasting time series
forecast.StructTS Forecasting using Structural Time Series models
ggmonthplot Create a seasonal subseries ggplot
gold Daily morning gold prices
msts Multi-Seasonal Time Series
na.interp Interpolate missing values in a time series
plot.bats Plot components from BATS model
plot.ets Plot components from ETS model
thetaf Theta method forecast
tsCV Time series cross-validation
wineind Australian total wine sales
woolyrnq Quarterly production of woollen yarn in Australia
autoplot.acf ggplot (Partial) Autocorrelation and Cross-Correlation Function Estimation and Plotting
autoplot.decomposed.ts Plot time series decomposition components using ggplot
forecast.fracdiff Forecasting using ARIMA or ARFIMA models
arfima Fit a fractionally differenced ARFIMA model
accuracy Accuracy measures for a forecast model
forecast.HoltWinters Forecasting using Holt-Winters objects
forecast.baggedETS Forecasting using the bagged ETS method
forecast.bats Forecasting using BATS and TBATS models
gghistogram Histogram with optional normal and kernel density functions
gglagplot Time series lag ggplots
nnetar Neural Network Time Series Forecasts
plot.Arima Plot characteristic roots from ARIMA model
reexports Objects exported from other packages
residuals.tslm Residuals for various time series models
tbats TBATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)
tbats.components Extract components of a TBATS model
tsclean Identify and replace outliers and missing values in a time series
ggtsdisplay Time series display
Acf (Partial) Autocorrelation and Cross-Correlation Function Estimation
Arima Fit ARIMA model to univariate time series
bats BATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)
bizdays Number of trading days in each season
dshw Double-Seasonal Holt-Winters Forecasting
easter Easter holidays in each season
forecast.mlm Forecast a multiple linear model with possible time series components
forecast.mts Forecasting time series
fourier Fourier terms for modelling seasonality
gas Australian monthly gas production
meanf Mean Forecast
monthdays Number of days in each season
seasonaldummy Seasonal dummy variables
ggseasonplot Seasonal plot
subset.ts Subsetting a time series
taylor Half-hourly electricity demand
arimaorder Return the order of an ARIMA or ARFIMA model
arima.errors Errors from a regression model with ARIMA errors
checkresiduals Check that residuals from a time series model look like white noise
bld.mbb.bootstrap Box-Cox and Loess-based decomposition bootstrap.
fitted.fracdiff h-step in-sample forecasts for time series models.
forecast-package Forecasting Functions for Time Series and Linear Models
autolayer.mts Automatically create a ggplot for time series objects
baggedETS Forecasting using the bagged ETS method
CVar k-fold Cross-Validation applied to an autoregressive model
CV Cross-validation statistic
forecast.ets Forecasting using ETS models
ets Exponential smoothing state space model
forecast.lm Forecast a linear model with possible time series components
is.constant Is an object constant?
findfrequency Find dominant frequency of a time series
is.acf Is an object a particular model type?
is.forecast Is an object a particular forecast type?
ma Moving-average smoothing
forecast.stl Forecasting using stl objects
StatForecast Forecast plot
plot.forecast Forecast plot
forecast.nnetar Forecasting using neural network models
getResponse Get response variable from time series model.
autoplot.mforecast Multivariate forecast plot
ses Exponential smoothing forecasts
rwf Naive and Random Walk Forecasts
ndiffs Number of differences required for a stationary series
simulate.ets Simulation from a time series model
tslm Fit a linear model with time series components
tsoutliers Identify and replace outliers in a time series
seasadj Seasonal adjustment
seasonal Extract components from a time series decomposition
sindexf Forecast seasonal index
splinef Cubic Spline Forecast
BoxCox.lambda Automatic selection of Box Cox transformation parameter
auto.arima Fit best ARIMA model to univariate time series
No Results!

Vignettes of forecast

Name
JSS-paper.bib
JSS2008.Rmd
jsslogo.jpg
No Results!

Last month downloads

Details

LinkingTo Rcpp (>= 0.11.0), RcppArmadillo (>= 0.2.35)
LazyData yes
ByteCompile TRUE
BugReports https://github.com/robjhyndman/forecast/issues
License GPL-3
URL http://pkg.robjhyndman.com/forecast, https://github.com/robjhyndman/forecast
VignetteBuilder knitr
RoxygenNote 6.0.1.9000
NeedsCompilation yes
Packaged 2017-09-25 01:25:04 UTC; hyndman
Repository CRAN
Date/Publication 2017-09-25 18:12:34 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/forecast)](http://www.rdocumentation.org/packages/forecast)