Description Usage Arguments Value See Also Examples

Get the fitted values from a DFA as a data frame

1 | ```
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

1 2 3 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.