Shows the posterior median and 50% and 90% credible intervals of a generated quantity over time.

# S3 method for class 'cidm_fit'
plot(x, type = c("cases", "Rt", "infections", "latent"), horizon = 0, ...)

Arguments

x

An cidm_fit object from fit().

type

Character string. What to plot: "cases" (posterior predictive observations with the data), "Rt" (reproduction number, renewal models only), "infections", or "latent" (the latent process on its own scale).

horizon

Integer. For type = "cases", number of time points to forecast.

...

Unused.

Value

A ggplot2 object.

Examples

if (FALSE) { # \dontrun{
plot(fitted, type = "Rt")
plot(fitted, type = "cases", horizon = 14)
} # }