| dfa_loadings | R Documentation |
Get the loadings from a DFA as a data frame
dfa_loadings(rotated_modelfit, names = NULL, summary = TRUE, conf_level = 0.95)
rotated_modelfit |
Output from |
names |
An optional vector of names for plotting the loadings. |
summary |
Logical. Should the full posterior densities be returned? Defaults to |
conf_level |
Confidence level for credible intervals. Defaults to 0.95. |
A data frame with the following columns:
name is an identifier for each loading, trend is the trend for the
loading, median is the posterior median loading, lower is the lower CI,
upper is the upper CI, and prob_diff0 is the probability the loading is
different than 0. When summary = FALSE, there is no lower or upper
columns and instead there are columns chain and draw.
plot_loadings fit_dfa rotate_trends
set.seed(42)
s <- sim_dfa(num_trends = 2, num_ts = 4, num_years = 10)
# only 1 chain and 180 iterations used so example runs quickly:
m <- fit_dfa(y = s$y_sim, num_trends = 2, iter = 50, chains = 1)
r <- rotate_trends(m)
loadings <- dfa_loadings(r, summary = TRUE)
loadings <- dfa_loadings(r, summary = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.