autoplot.tulip: Autoplot method for 'tulip' objects

View source: R/autoplot.R

autoplot.tulipR Documentation

Autoplot method for tulip objects

Description

Use ggplot2 to visualize the components or fitted values of a fitted model of class tulip

Usage

autoplot.tulip(
  object,
  ...,
  method = c("components", "fitted")[1],
  date = NULL,
  scales = c("free", "fixed")[1],
  show_anomalies = TRUE,
  show_params = TRUE
)

Arguments

object

Fitted model object of class tulip returned by tulip()

...

ignored

method

One of components for visualization of the level, trend, seasonal, and error components of the fitted model (default), or fitted to visualize the fitted values in comparison to the input series

date

Optional additional vector with dates in format that can be cast to YYYY-MM-DD with same length as object$y, used to create x-axis

scales

One of free or fixed, passed to the scales argument of ggplot2::facet_grid(); used when method is "components"

show_anomalies

Logical; when TRUE (default), observations that were treated as anomalies during model fit will be marked in orange; used when method is "fitted"

show_params

Logical; if TRUE (default) then fitted params will be displayed using ggplot2::facet_wrap(); used when method is "fitted"


timradtke/heuristika documentation built on April 24, 2023, 1:55 a.m.