Visualise results of the provided model
plot_seromodel(
seromodel,
serosurvey,
alpha = 0.05,
bin_serosurvey = FALSE,
bin_step = 5,
foi_df = NULL,
foi_max = NULL,
loo_estimate_digits = 1,
central_estimate_digits = 2,
seroreversion_digits = 2,
rhat_digits = 2,
size_text = 11,
plot_constant = FALSE,
x_axis = NA
)seromodel summary plot
stan_fit object obtained from sampling a model with fit_seromodel
survey_yearYear in which the survey took place (only needed to plot time models)
age_minFloor value of the average between age_min and age_max
age_maxThe size of the sample
n_sampleNumber of samples for each age group
n_seropositiveNumber of positive samples for each age group
1 - alpha indicates the credibility level to be used
If TRUE, serodata is binned by means of
prepare_bin_serosurvey.
Otherwise, age groups are kept as originally input.
Integer specifying the age groups bin size to be used when
bin_serosurvey is set to TRUE.
Dataframe with columns
year/ageYear/Age (depending on the model)
foiForce-of-infection values by year/age
Max FoI value for plotting
Number of loo estimate digits
Number of central estimate digits
Number of seroreversion rate digits
Number of rhat estimate digits
Size of text for plotting (base_size in
ggplot2)
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 seromodel@model_name == "constant")
either "time" or "age". Specifies time axis values
label for constant model additional plots. Only relevant when
and seromodel@model_name == "constant"
# \donttest{
data(veev2012)
seromodel <- fit_seromodel(veev2012, iter = 100)
plot_seromodel(seromodel, veev2012)
# }
Run the code above in your browser using DataLab