MEAN: Mean models

View source: R/mean.R

MEANR Documentation

Mean models

Description

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

Usage

MEAN(formula, ...)

Arguments

formula

Model specification.

...

Not used.

Details

The model does not use any specials, and so everything on the formula's right-hand-side will be ignored.

Value

A model specification.

Specials

window

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

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

See Also

Forecasting: Principles and Practices, Some simple forecasting methods (section 3.2)

Examples

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

fable documentation built on Sept. 2, 2022, 1:07 a.m.