Bayesian Dynamic Factor Analysis (DFA) with 'Stan'
The 'bayesdfa' package.
Apply cross validation to DFA model
Get the fitted values from a DFA as a data frame
Get the loadings from a DFA as a data frame
Get the trends from a DFA as a data frame
Find the best number of trends according to LOOIC
Find which chains to invert
Fit multiple models with differing numbers of regimes to trend data
Find outlying "black swan" jumps in trends
Fit a Bayesian DFA
Fit models with differing numbers of regimes to trend data
Create initial values for the HMM model.
Invert chains
Summarize Rhat convergence statistics across parameters
LOO information criteria
Plot the fitted values from a DFA
Plot the loadings from a DFA
Plot the state probabilities from find_regimes()
Plot the trends from a DFA
Calculate predicted value from DFA object
Rotate the trends from a DFA
Simulate from a DFA
Estimate the correlation between a DFA trend and some other timeseries
Implements Bayesian dynamic factor analysis with 'Stan'. Dynamic factor analysis is a dimension reduction tool for multivariate time series. 'bayesdfa' extends conventional dynamic factor models in several ways. First, extreme events may be estimated in the latent trend by modeling process error with a student-t distribution. Second, alternative constraints (including proportions are allowed). Third, the estimated dynamic factors can be analyzed with hidden Markov models to evaluate support for latent regimes.