# Bayesian Dynamic Factor Analysis (DFA) with 'Stan'

## Documentation for package ‘bayesdfa’ version 1.3.4

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

bayesdfa-package | The 'bayesdfa' package.
bayesdfa | The 'bayesdfa' package.
dfa_cv | Apply cross validation to DFA model
dfa_fitted | Get the fitted values from a DFA as a data frame
dfa_loadings | Get the loadings from a DFA as a data frame
dfa_trends | Get the trends from a DFA as a data frame
find_dfa_trends | Find the best number of trends according to LOOIC
find_inverted_chains | Find which chains to invert
find_regimes | Fit multiple models with differing numbers of regimes to trend data
find_swans | Find outlying "black swan" jumps in trends
fit_dfa | Fit a Bayesian DFA
fit_regimes | Fit models with differing numbers of regimes to trend data
hmm_init | Create initial values for the HMM model.
invert_chains | Invert chains
is_converged | Summarize Rhat convergence statistics across parameters
loo | LOO information criteria
loo.bayesdfa | LOO information criteria
plot_fitted | Plot the fitted values from a DFA
plot_loadings | Plot the loadings from a DFA
plot_regime_model | Plot the state probabilities from 'find_regimes()'
plot_trends | Plot the trends from a DFA
predicted | Calculate predicted value from DFA object
rotate_trends | Rotate the trends from a DFA
sim_dfa | Simulate from a DFA
trend_cor | Estimate the correlation between a DFA trend and some other timeseries