plot_trends: Plot the trends from a DFA

Description Usage Arguments See Also Examples

View source: R/plot_trends.R

Description

Plot the trends from a DFA

Usage

1
2
3
4
5
6
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

1
2
3
4
5
6
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 May 29, 2021, 1:06 a.m.