augment.mdl_df {fabletools} | R Documentation |
Augment a mable
Description
Uses a fitted model to augment the response variable with fitted values and
residuals. Response residuals (back-transformed) are stored in the .resid
column, while innovation residuals (transformed) are stored in the .innov
column.
Usage
## S3 method for class 'mdl_df'
augment(x, ...)
## S3 method for class 'mdl_ts'
augment(x, type = NULL, ...)
Arguments
x |
A mable. |
... |
Arguments for model methods. |
type |
Deprecated. |
Examples
library(fable)
library(tsibbledata)
# Forecasting with an ETS(M,Ad,A) model to Australian beer production
aus_production %>%
model(ets = ETS(log(Beer) ~ error("M") + trend("Ad") + season("A"))) %>%
augment()
[Package fabletools version 0.4.2 Index]