View source: R/methods-fable.R
| forecast.MEDIAN | R Documentation |
Forecast a fitted MEDIAN model.
## S3 method for class 'MEDIAN'
forecast(object, new_data, specials = NULL, ...)
object |
A fitted |
new_data |
A |
specials |
Parsed specials. Currently not used. |
... |
Additional arguments. Currently not used. |
A vector of forecast distributions.
Other MEDIAN:
MEDIAN(),
fitted.MEDIAN(),
model_sum.MEDIAN(),
residuals.MEDIAN()
library(dplyr)
library(tsibble)
library(fabletools)
train_frame <- M4_monthly_data |>
filter(series == first(series)) |>
as_tsibble(index = index)
model_frame <- train_frame |>
model("MEDIAN" = MEDIAN(value ~ window()))
forecast(model_frame, h = 12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.