plot_trends: Plot the trends from a DFA

View source: R/plot_trends.R

plot_trendsR Documentation

Plot the trends from a DFA

Description

Plot the trends from a DFA

Usage

plot_trends(
  rotated_modelfit,
  years = NULL,
  highlight_outliers = FALSE,
  threshold = 0.01
)

Arguments

rotated_modelfit

Output from rotate_trends

years

Optional numeric vector of years for the plot

highlight_outliers

Logical. Should trend events that exceed the probability of occurring with a normal distribution as defined by threshold be highlighted? Defaults to FALSE

threshold

A probability threshold below which to flag trend events as extreme. Defaults to 0.01

See Also

dfa_trends plot_loadings fit_dfa rotate_trends

Examples

set.seed(1)
s <- sim_dfa(num_trends = 1)
m <- fit_dfa(y = s$y_sim, num_trends = 1, iter = 50, chains = 1)
r <- rotate_trends(m)
p <- plot_trends(r)
print(p)

bayesdfa documentation built on Oct. 11, 2023, 5:14 p.m.