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

## Documentation for package ‘bayesdfa’ version 0.1.3

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

## Help Pages

bayesdfa-package | The 'bayesdfa' package.
bayesdfa | The 'bayesdfa' package.
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 trends 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