plot_antibody_model: Plot the antibody model

View source: R/plot_antibody_model.R

plot_antibody_modelR Documentation

Plot the antibody model

Description

Plots the trajectory of the serosolver antibody model using specified parameters and optionally a specified antigenic map and infection history.

Usage

plot_antibody_model(
  pars,
  times = NULL,
  infection_history = NULL,
  antigenic_map = NULL,
  label_parameters = FALSE
)

Arguments

pars

the vector of named model parameters, including 'boost_long', 'boost_short','boost_delay','wane_long','wane_short','cr_long', and 'cr_short'.

times

the vector of times to solve the model over. A continuous vector of discrete timepoints. Can be left to NULL if this information is included in the 'antigenic_map' argument.

infection_history

the vector of times matching entries in 'times' to simulate infections in.

antigenic_map

the antigenic map to solve the model with. Can be left to NULL to ssume all biomarker IDs have the same antigenic coordinates.

label_parameters

if TRUE, labels the model parameters on the plot

Value

a list with two ggplot objects, one showing the simulated antibody kinetics over time, stratified by biomarker ID, the other showing simulated antibody kinetics for each biomarker ID, stratified by sample time

Examples

plot_antibody_model(c("boost_long"=2,"boost_short"=3,"boost_delay"=1,"wane_short"=0.2,"wane_long"=0.01, "antigenic_seniority"=0,"cr_long"=0.1,"cr_short"=0.03), times=seq(1,25,by=1),infection_history=NULL,antigenic_map=example_antigenic_map)
 

adamkucharski/serosolver documentation built on April 28, 2024, 6:19 p.m.