View source: R/plot_seromodel.R
plot_rhats | R Documentation |
Plot r-hats convergence criteria for the specified model
plot_rhats(
seromodel,
serosurvey,
size_text = 11,
plot_constant = FALSE,
x_axis = NA
)
seromodel |
stan_fit object obtained from sampling a model with fit_seromodel |
serosurvey |
|
size_text |
Size of text for plotting ( |
plot_constant |
boolean specifying whether to plot single
Force-of-Infection estimate and its corresponding rhat value instead
of showing this information in the summary.
Only relevant when |
x_axis |
either |
ggplot object showing the r-hats of the model to be compared with the convergence criteria (horizontal dashed line)
data(chagas2012)
seromodel <- fit_seromodel(
serosurvey = chagas2012,
model_type = "time",
foi_index = data.frame(
year = 1935:2011,
foi_index = c(rep(1, 46), rep(2, 31))
),
iter = 100,
chains = 2
)
plot_rhats(seromodel, chagas2012)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.