plot_estimated_antibody_model: Plots estimated antibody kinetics model

View source: R/plot_antibody_model.R

plot_estimated_antibody_modelR Documentation

Plots estimated antibody kinetics model

Description

Plots estimated antibody kinetics model

Usage

plot_estimated_antibody_model(
  chain,
  antibody_data = NULL,
  demographics = NULL,
  antigenic_map = NULL,
  possible_exposure_times = NULL,
  par_tab = NULL,
  nsamp = 1000,
  measurement_bias = NULL,
  solve_times = seq(1, 30, by = 1),
  data_type = 1,
  settings = NULL,
  by_group = TRUE,
  add_prediction_intervals = FALSE
)

Arguments

chain

the full MCMC chain to generate antibody level trajectories from

antibody_data

the data frame of antibody level data

antigenic_map

(optional) a data frame of antigenic x and y coordinates. Must have column names: x_coord; y_coord; inf_times. See example_antigenic_map

possible_exposure_times

(optional) if no antigenic map is specified, this argument gives the vector of times at which individuals can be infected

par_tab

the table controlling the parameters in the MCMC chain

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

solve_times

vector of times to solve model over

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

Value

a ggplot2 object giving model-predicted antibody level and predicted observations over time since infection

See Also

Other infection_history_plots: calculate_infection_history_statistics(), plot_antibody_data(), plot_antibody_predictions(), plot_cumulative_infection_histories(), plot_individual_number_infections(), plot_infection_history_chains_indiv(), plot_infection_history_chains_time(), plot_model_fits(), plot_posteriors_infhist(), plot_total_number_infections()


seroanalytics/serosolver documentation built on Aug. 18, 2024, 12:46 p.m.