Description Usage Arguments Details Examples

View source: R/plot_regime_model.R

Plot the state probabilities from `find_regimes()`

1 2 3 4 5 6 7 8 |

`model` |
A model returned by |

`probs` |
A numeric vector of quantiles to plot the credible intervals at.
Defaults to |

`type` |
Whether to plot the probabilities (default) or means. |

`regime_prob_threshold` |
The probability density that must be above 0.5.
Defaults to 0.9 before we classify a regime (only affects |

`plot_prob_indices` |
Optional indices of probability plots to plot. Defaults to showing all. |

`flip_regimes` |
Optional whether to flip regimes in plots, defaults to FALSE |

Note that the original timeseries data (dots) are shown scaled between 0 and 1.

1 2 3 4 5 | ```
data(Nile)
m <- fit_regimes(log(Nile), n_regimes = 2, chains = 1, iter = 50)
plot_regime_model(m)
plot_regime_model(m, plot_prob_indices = c(2))
plot_regime_model(m, type = "means")
``` |

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.