Package

Forecast package

forecast-package

Forecasting Functions for Time Series and Linear Models

Time series analysis

Functions for working with time series

msts

Multi-Seasonal Time Series

subset

Subsetting a time series

bizdays

Number of trading days in each season

easter

Easter holidays in each season

monthdays

Number of days in each season

fourier fourierf

Fourier terms for modelling seasonality

seasonaldummy seasonaldummyf

Seasonal dummy variables

findfrequency

Find dominant frequency of a time series

BoxCox InvBoxCox

Box Cox Transformation

BoxCox.lambda

Automatic selection of Box Cox transformation parameter

tsclean

Identify and replace outliers and missing values in a time series

tsoutliers

Identify and replace outliers in a time series

na.interp

Interpolate missing values in a time series

ndiffs nsdiffs

Number of differences required for a stationary series

bld.mbb.bootstrap

Box-Cox and Loess-based decomposition bootstrap.

is.constant

Is an object constant?

Seasonal decomposition

Functions used in seasonal decomposition

ma

Moving-average smoothing

mstl

Multiple seasonal decomposition

seasadj

Seasonal adjustment

seasonal trendcycle remainder

Extract components from a time series decomposition

Modelling

Functions for estimating time series models

arfima

Fit a fractionally differenced ARFIMA model

Arima

Fit ARIMA model to univariate time series

auto.arima

Fit best ARIMA model to univariate time series

ets

Exponential smoothing state space model

baggedModel baggedETS

Forecasting using a bagged model

bats

BATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)

tbats

TBATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)

nnetar

Neural Network Time Series Forecasts

forecast stlm stlf

Forecasting using stl objects

tslm

Fit a linear model with time series components

Forecasting

Functions for producing forecasts

rwf naive snaive

Naive and Random Walk Forecasts

meanf

Mean Forecast

ses holt hw

Exponential smoothing forecasts

dshw

Double-Seasonal Holt-Winters Forecasting

forecast stlm stlf

Forecasting using stl objects

splinef

Cubic Spline Forecast

thetaf

Theta method forecast

croston

Forecasts for intermittent demand using Croston's method

sindexf

Forecast seasonal index

forecast

Forecasting time series

forecast.fracdiff

Forecasting using ARIMA or ARFIMA models

forecast.ets

Forecasting using ETS models

forecast.baggedModel

Forecasting using a bagged model

forecast

Forecasting using BATS and TBATS models

forecast.HoltWinters

Forecasting using Holt-Winters objects

forecast

Forecast a linear model with possible time series components

forecast

Forecast a multiple linear model with possible time series components

forecast.mts

Forecasting time series

forecast.nnetar

Forecasting using neural network models

forecast.StructTS

Forecasting using Structural Time Series models

Plotting

Functions for plotting time series and forecasts

gghistogram

Histogram with optional normal and kernel density functions

ggseasonplot seasonplot

Seasonal plot

ggmonthplot ggsubseriesplot

Create a seasonal subseries ggplot

gglagplot

Time series lag ggplots

Acf Pacf Ccf taperedacf taperedpacf

(Partial) Autocorrelation and Cross-Correlation Function Estimation

autoplot ggAcf ggPacf ggCcf ggtaperedacf ggtaperedpacf

ggplot (Partial) Autocorrelation and Cross-Correlation Function Estimation and Plotting

ggtsdisplay tsdisplay

Time series display

checkresiduals

Check that residuals from a time series model look like white noise

plot autoplot

Plot characteristic roots from ARIMA model

plot autoplot

Plot components from BATS model

plot autoplot

Plot components from ETS model

plot.forecast

Forecast plot

autoplot autolayer plot

Multivariate forecast plot

autoplot

Plot time series decomposition components using ggplot

autolayer autoplot fortify

Automatically create a ggplot for time series objects

autolayer

Create a ggplot layer appropriate to a particular data type

Model analysis

Functions for analysing time series models

fitted

h-step in-sample forecasts for time series models.

residuals

Residuals for various time series models

checkresiduals

Check that residuals from a time series model look like white noise

arimaorder

Return the order of an ARIMA or ARFIMA model

simulate

Simulation from a time series model

tbats.components

Extract components of a TBATS model

Forecast evaluation

Functions used for evaluating forecasts

accuracy

Accuracy measures for a forecast model

CVar

k-fold Cross-Validation applied to an autoregressive model

CV

Cross-validation statistic

tsCV

Time series cross-validation

dm.test

Diebold-Mariano test for predictive accuracy

Data

Data sets included in the package

gas

Australian monthly gas production

gold

Daily morning gold prices

taylor

Half-hourly electricity demand

wineind

Australian total wine sales

woolyrnq

Quarterly production of woollen yarn in Australia