setup_antibody_data_for_posterior_func | R Documentation |
Sets up a large list of pre-indexing and pre-processing to speed up the model solving during MCMC fitting. Note that this should be 'antibody_data' after subsetting to only 'run==1', as we will figure out elsewhere which solves to use as repeats
setup_antibody_data_for_posterior_func(
par_tab,
antibody_data,
antigenic_map = NULL,
possible_exposure_times = NULL,
age_mask = NULL,
n_alive = NULL,
verbose = FALSE,
use_demographic_groups = NULL,
timevarying_demographics = NULL
)
par_tab |
the parameter table controlling information such as bounds, initial values etc. See |
antibody_data |
the data frame of data to be fitted. Must have columns: group (index of group); individual (integer ID of individual); samples (numeric time of sample taken); virus (numeric time of when the virus was circulating); biomarker_group (integer of the observation group type, using a unique value for each distinctive type of observation underpinned by the same generative model); titre (integer of titre value against the given virus at that sampling time). See |
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 |
age_mask |
see |
n_alive |
if not NULL, uses this as the number alive in a given year rather than calculating from the ages. This is needed if the number of alive individuals is known, but individual birth dates are not |
verbose |
if TRUE, brings warning messages |
use_demographic_groups |
vector of variable names in 'antibody_data' which should form the stratification for the antibody kinetics model |
timevarying_demographics |
if not NULL, then calculates an individual's demographic group over the entire time period of the simulation rather than assuming fixed demographics |
a very long list. See source code directly.
create_posterior_func
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.