simulate_antibody_model: Simulate the antibody model

View source: R/simulate_data.R

simulate_antibody_modelR Documentation

Simulate the antibody model

Description

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

Usage

simulate_antibody_model(
  pars,
  times = NULL,
  infection_history = NULL,
  antigenic_map = NULL
)

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.

Value

a data frame with variables 'sample_times', 'biomarker_id' and 'antibody_level'

Examples

simulate_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)
 

seroanalytics/serosolver documentation built on Dec. 14, 2024, 5:33 a.m.