View source: R/plot_antibody_model.R
plot_antibody_model | R Documentation |
Plots the trajectory of the serosolver antibody model using specified parameters and optionally a specified antigenic map and infection history.
plot_antibody_model(
pars,
times = NULL,
infection_history = NULL,
antigenic_map = NULL,
label_parameters = FALSE
)
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 |
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.