View source: R/rotate_trends.R
rotate_trends | R Documentation |
Rotate the trends from a DFA
rotate_trends(fitted_model, conf_level = 0.95, invert = FALSE)
fitted_model |
Output from |
conf_level |
Probability level for CI. |
invert |
Whether to invert the trends and loadings for plotting purposes |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.