rotate_trends: Rotate the trends from a DFA

View source: R/rotate_trends.R

rotate_trendsR Documentation

Rotate the trends from a DFA

Description

Rotate the trends from a DFA

Usage

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

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 Oct. 11, 2023, 5:14 p.m.