plot_trends {bayesdfa}R 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)

[Package bayesdfa version 1.1.0 Index]