dfa_fitted {bayesdfa} | R Documentation |
Get the fitted values from a DFA as a data frame
dfa_fitted(modelfit, conf_level = 0.95, names = NULL)
modelfit |
Output from |
conf_level |
Probability level for CI. |
names |
Optional vector of names for time series labels. Should be same length as the number of time series. |
A data frame with the following columns: ID
is an identifier for each time series, time
is the time step, y
is the observed values standardized to mean 0 and unit variance, estimate
is the mean fitted value, lower
is the lower CI, and upper
is the upper CI.
predicted plot_fitted fit_dfa
y <- sim_dfa(num_trends = 2, num_years = 20, num_ts = 4) m <- fit_dfa(y = y$y_sim, num_trends = 2, iter = 50, chains = 1) fitted <- dfa_fitted(m)