Learn R Programming

⚠️There's a newer version (0.4.0) of this package.Take me there.

fable

The R package fable provides methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling. Data, model and forecast objects are all stored in a tidy format.

Installation

You can install the development version from Github

# install.packages("devtools")
devtools::install_github("tidyverts/fable")

Example

library(fable)
library(tsibbledata)
UKLungDeaths %>%
  ETS(log(mdeaths)) %>%
  forecast
#> # A tsibble: 24 x 3 [1M]
#>       index  mean distribution         
#>       <mth> <dbl> <dist>               
#>  1 1980 Jan 1832. t(N(7.5, sd = 0.098))
#>  2 1980 Feb 1854. t(N(7.5, sd = 0.098))
#>  3 1980 Mar 1732. t(N(7.5, sd = 0.097))
#>  4 1980 Apr 1444. t(N(7.3, sd = 0.094))
#>  5 1980 May 1155. t(N(7, sd = 0.092))  
#>  6 1980 Jun 1050. t(N(7, sd = 0.09))   
#>  7 1980 Jul 1000. t(N(6.9, sd = 0.09)) 
#>  8 1980 Aug  915. t(N(6.8, sd = 0.089))
#>  9 1980 Sep  915. t(N(6.8, sd = 0.089))
#> 10 1980 Oct 1081. t(N(7, sd = 0.091))  
#> # ... with 14 more rows

You can read more about the functionality of this package and the ideas behind it here: https://tidyverts.github.io/tidy-forecasting-principles/

Copy Link

Version

Install

install.packages('fable')

Monthly Downloads

17,807

Version

0.0.0.9000

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 25th, 2024

Functions in fable (0.0.0.9000)

fable-package

Forecasting Functions for Tidy Time Series
invert_transformation

Invert a transformation
lower

Helpers for hilo
multi_univariate

Multiple calls to a univariate model for each tsibble key
new_fcdist

Create a forecast distribution object
traverse

Recursively traverse an object
scale_tsibble

tsibble datetime scales This set of scales defines new scales for aggregate time structures defined in tsibble.
parse_model_lhs

Parse the RHS of the model formula for transformations
scale_level

Level colour scales
stream

Extend a fitted model with new data
fable

Create a new fable
GeomForecast

Forecast plot
reexports

Objects exported from other packages
guide_train.level_guide

Helper methods for guides
new_transformation

Create a new modelling transformation
new_specials_env

Create evaluation environment for specials
mable

Create a new mable
parse_model_rhs

Parse the RHS of the model formula for specials
model_rhs

Extract the right hand side of a model
model_sum

Provide a succinct summary of a model
report

Report information about an object
model_lhs

Extract the left hand side of a model
retry

Retry with backup function
RW

Random walk models
as_dable

Coerce a dataset to a dable
as_fable

Coerce a dataset to a fable
bt

Validate whether values fall in the hilo
as_mable

Coerce a dataset to a mable
STL

Multiple seasonal decomposition
LM

Fit a linear model with time series components
new_hilo

Construct hilo intervals
components

Extract model or decomposition components
ARIMA

Estimate an ARIMA model
guide_level

Level shade bar guide
ETS

Exponential smoothing state space model
biasadj

Bias adjust back-transformation functions
dable

Create a new dable
parse_model

Parse the model specification for specials
new_mable

Constructor
multi_model

Multiple calls to a model for mass modelling
new_fable

Constructor
validate_model

Validate the user provided model
is.constant

Is an object constant?
ARIMA2

Estimate an ARIMA model
ETS2

Exponential smoothing state space model
TSLM

Fit a linear model with time series components