rotate_trends: Rotate the trends from a DFA

Description Usage Arguments Examples

View source: R/rotate_trends.R

Description

Rotate the trends from a DFA

Usage

1
rotate_trends(fitted_model, conf_level = 0.95, invert = FALSE)

Arguments

fitted_model

Output from fit_dfa().

conf_level

Probability level for CI.

invert

Whether to invert the trends and loadings for plotting purposes

Examples

1
2
3
4
5
6
set.seed(42)
s <- sim_dfa(num_trends = 1, num_years = 20, num_ts = 3)
# only 1 chain and 800 iterations used so example runs quickly:
m <- fit_dfa(y = s$y_sim, iter = 50, chains = 1)
r <- rotate_trends(m)
plot_trends(r)

bayesdfa documentation built on May 29, 2021, 1:06 a.m.