augment: Augment a mable

augment.mdl_dfR 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()


fabletools documentation built on Oct. 12, 2023, 1:07 a.m.