forecast v7.2

0

Monthly downloads

0th

Percentile

by Rob Hyndman

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 Coverage Status CRAN_Status_Badge Downloads Pending Pull-Requests

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 on R 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)

# ETS forecasts
fit <- ets(USAccDeaths)
plot(forecast(fit))

# Automatic ARIMA forecasts
fit <- auto.arima(WWWusage)
plot(forecast(fit, h=20))

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

# Forecasting with STL
tsmod <- stlm(USAccDeaths, modelfunction=ar)
plot(forecast(tsmod, h=36))

plot(stlf(AirPassengers, lambda=0))

decomp <- stl(USAccDeaths,s.window="periodic")
plot(forecast(decomp))

# TBATS forecasts
fit <- tbats(USAccDeaths)
plot(forecast(fit))

taylor.fit <- tbats(taylor)
plot(forecast(taylor.fit))

License

This package is free and open source software, licensed under GPL (>= 2).

Functions in forecast

Name Description
autoplot.stl ggplot STL object
auto.arima Fit best ARIMA model to univariate time series
arfima Fit a fractionally differenced ARFIMA model
arima.errors ARIMA errors
autoplot.decomposed.ts ggplot of a decomposed time series object
autoplot.acf ggplot (Partial) Autocorrelation and Cross-Correlation Function Estimation
accuracy Accuracy measures for forecast model
arimaorder Return the order of an ARIMA or ARFIMA model
Arima Fit ARIMA model to univariate time series
Acf (Partial) Autocorrelation and Cross-Correlation Function Estimation
bizdays Number of trading days in each season
dshw Double-Seasonal Holt-Winters Forecasting
croston Forecasts for intermittent demand using Croston's method
BoxCox.lambda Automatic selection of Box Cox transformation parameter
BoxCox Box Cox Transformation
autoplot.ts Automatically create a ggplot for time series objects
easter Easter holidays in each season
bats BATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)
dm.test Diebold-Mariano test for predictive accuracy
CV Cross-validation statistic
fitted.bats h-step in-sample forecasts using bats models
fitted.nnetar h-step in-sample forecasts using nnetar models
forecast.Arima Forecasting using ARIMA or ARFIMA models
fitted.tbats h-step in-sample forecasts using tbats models
forecast.ets Forecasting using ETS models
findfrequency Find dominant frequency of a time series
fitted.ets h-step in-sample forecasts using ets models
forecast.bats Forecasting using BATS and TBATS models
fitted.Arima h-step in-sample forecasts using ARIMA models
gas Australian monthly gas production
plot.forecast Forecast plot
fortify.forecast Fortify a forecast object to data.frame for ggplot
forecast.StructTS Forecasting using Structural Time Series models
forecast.lm Forecast a linear model with possible time series components
ets Exponential smoothing state space model
logLik.ets Log-Likelihood of an ets object
meanf Mean Forecast
is.forecast Is an object a particular forecast type?
mforecast Forecasting time series
nnetar Neural Network Time Series Forecasts
plot.Arima Plot characteristic roots from ARIMA model
msts Multi-Seasonal Time Series
forecast Forecasting time series
plot.mforecast Multivariate forecast plot
forecast.mlm Forecast a multiple linear model with possible time series components
geom_forecast Forecast plot
sindexf Forecast seasonal index
seasadj Seasonal adjustment
subset.ts Subsetting a time series
seasonaldummy Seasonal dummy variables
simulate.ets Simulation from a time series model
seasonplot Seasonal plot
taylor Half-hourly electricity demand
tsoutliers Identify and replace outliers in a time series
forecast.stl Forecasting using stl objects
forecast.HoltWinters Forecasting using Holt-Winters objects
wineind Australian total wine sales
getResponse Get response variable from time series model.
tsdisplay Time series display
tsclean Identify and replace outliers and missing values in a time series
gglagplot Time series lag ggplots
ma Moving-average smoothing
ggmonthplot Create a seasonal subseries ggplot
is.ets Is an object a particular model type?
gold Daily morning gold prices
is.constant Is an object constant?
plot.bats Plot components from BATS model
na.interp Interpolate missing values in a time series
plot.ets Plot components from ETS model
ndiffs Number of differences required for a stationary series
monthdays Number of days in each season
naive Naive and Random Walk Forecasts
splinef Cubic Spline Forecast
ses Exponential smoothing forecasts
woolyrnq Quarterly production of woollen yarn in Australia
tbats.components Extract components of a TBATS model
tslm Fit a linear model with time series components
thetaf Theta method forecast
tbats TBATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)
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 (>= 2)
URL http://github.com/robjhyndman/forecast
NeedsCompilation yes
Packaged 2016-09-09 00:27:08 UTC; robjhyndman
Repository CRAN
Date/Publication 2016-09-09 10:13:44

Include our badge in your README

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