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

MEAN(formula, ...)

Arguments

formula

Model specification.

...

Not used.

Value

A model specification.

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.

Examples

library(tsibbledata)
vic_elec %>%
  model(avg = MEAN(Demand))
#> # A mable: 1 x 1
#>       avg
#>   <model>
#> 1  <MEAN>