plot_components: Plot state components of an 'tulip' model

View source: R/autoplot.R

plot_componentsR Documentation

Plot state components of an tulip model

Description

This function requires the ggplot2. Whether its namespace is available will be checked when the function is run. ggplot2 is only suggested, not a default import.

Usage

plot_components(object, date = NULL, scales = c("free", "fixed")[1])

Arguments

object

Fitted model object returned by tulip()

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()

Examples

set.seed(4278)
y <- rt(100, df = 10) * 10 + 1:100

fitted <- tulip(y = y, m = 12, family = "norm")
tulip:::plot_components(object = fitted)


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