MEAN() returns an iid model applied to the formula's response variable.
The model does not use any specials, and so everything on the formula's right-hand-side will be ignored.
A model specification.
window special is used to specify a rolling window for the mean.
window(size = NULL)
||The size (number of observations) for the rolling window. If NULL (default), a rolling window will not be used.|
Forecasting: Principles and Practices, Some simple forecasting methods (section 3.2)
library(tsibbledata) vic_elec %>% model(avg = MEAN(Demand))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.