View source: R/plot_regime_model.R
plot_regime_model | R Documentation |
find_regimes()
Plot the state probabilities from find_regimes()
plot_regime_model(
model,
probs = c(0.05, 0.95),
type = c("probability", "means"),
regime_prob_threshold = 0.9,
plot_prob_indices = NULL,
flip_regimes = FALSE
)
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.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.