View source: R/plot_antibody_model.R
plot_antibody_predictions | R Documentation |
Plots model predicted titers against observations
plot_antibody_predictions(
chain,
infection_histories,
antibody_data = NULL,
demographics = NULL,
par_tab = NULL,
antigenic_map = NULL,
possible_exposure_times = NULL,
nsamp = 1000,
measurement_bias = NULL,
data_type = 1,
start_level = "none",
settings = NULL
)
chain |
the full MCMC chain to generate antibody level trajectories from |
infection_histories |
the MCMC chain for infection histories |
antibody_data |
the data frame of antibody level data |
par_tab |
the table controlling the parameters in the MCMC chain |
antigenic_map |
(optional) a data frame of antigenic x and y coordinates. Must have column names: x_coord; y_coord; inf_times. See |
possible_exposure_times |
(optional) if no antigenic map is specified, this argument gives the vector of times at which individuals can be infected |
nsamp |
number of samples to take from posterior |
measurement_bias |
default NULL, optional data frame giving the index of ‘rho' that each biomarker_id and biomarker_group which uses the measurement shift from from. eg. if there’s 6 circulation years and 3 strain clusters |
data_type |
integer, currently accepting 1 or 2. Set to 1 for discretized, bounded data, or 2 for continuous, bounded data. |
settings |
if not NULL, list of serosolver settings as returned from the main serosolver function |
a list with:
a data frame with all posterior estimates for each observation;
the proportion of observations captured by the 95
a histogram comparing posterior median estimates to the observed data (note, this can be misleading for continuous data due to the zero-inflated observation model);
a histogram comparing random posterior draws to the observed data (can be more reliable than posterior medians);
comparison of observations and all posterior medians and 95
Other infection_history_plots:
calculate_infection_history_statistics()
,
plot_antibody_data()
,
plot_cumulative_infection_histories()
,
plot_estimated_antibody_model()
,
plot_individual_number_infections()
,
plot_infection_history_chains_indiv()
,
plot_infection_history_chains_time()
,
plot_model_fits()
,
plot_posteriors_infhist()
,
plot_total_number_infections()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.