Learn R Programming

fabletools (version 0.5.0)

augment.mdl_df: 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 mdl_df
augment(x, ...)

# S3 method for mdl_ts augment(x, type = NULL, ...)

Arguments

x

A mable.

...

Arguments for model methods.

type

Deprecated.

Examples

Run this code
if (FALSE) { # requireNamespace("fable", quietly = TRUE)
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()
}

Run the code above in your browser using DataLab