Learn R Programming

fable (version 0.4.0)

MEAN: Mean models

Description

MEAN() returns an iid model applied to the formula's response variable.

Usage

MEAN(formula, ...)

Value

A model specification.

Arguments

formula

Model specification.

...

Not used.

Specials

window

The window special is used to specify a rolling window for the mean.


window(size = NULL)

sizeThe size (number of observations) for the rolling window. If NULL (default), a rolling window will not be used.

See Also

Examples

Run this code
library(tsibbledata)
vic_elec %>%
  model(avg = MEAN(Demand))

Run the code above in your browser using DataLab