antibody_model | R Documentation |
Overall model function, fast implementation
antibody_model(
theta,
unique_theta_indices,
unique_biomarker_groups,
infection_history_mat,
infection_history_mat_indices,
indiv_theta_groups,
possible_exposure_times,
possible_exposure_times_indices,
sample_times,
type_data_start,
biomarker_groups,
sample_data_start,
antibody_data_start,
nrows_per_sample,
biomarker_id_indices,
start_level_indices,
starting_antibody_levels,
births,
antigenic_map_long,
antigenic_map_short,
antigenic_distances,
timevarying_groups = FALSE,
boost_before_infection = FALSE
)
theta |
NumericVector, the named vector of model parameters |
infection_history_mat |
IntegerMatrix, the matrix of 1s and 0s showing presence/absence of infection for each possible time for each individual. |
possible_exposure_times |
NumericVector, the time periods that the infection history vector corresponds to |
possible_exposure_times_indices |
IntegerVector, which entry in the melted antigenic map that each possible infection time corresponds to |
sample_times |
NumericVector, the times that each blood sample was taken |
type_data_start |
IntegerVector, one entry for each unique individual. Each entry gives the starting index for each individual of the data frame 'unique(antibody_data[,c("individual","biomarker_group")])'. |
biomarker_groups |
IntegerVector, result of 'unique(antibody_data[,c("individual","biomarker_group")])$biomarker_group' |
sample_data_start |
IntegerVector, one entry for each unique individual and observation type combination. Each entry dictates how many indices through sample_times to iterate per individual and observation type (ie. how many sample times does each individual have?) |
antibody_data_start |
IntegerVector, How many cumulative rows in the antibody data correspond to each unique individual and observation type combination? |
nrows_per_sample |
IntegerVector, one entry per sample taken. Dictates how many entries to iterate through cum_nrows_per_individual_in_data for each sampling time considered |
biomarker_id_indices |
IntegerVector, the indices of all measured biomarkers in the melted antigenic map, with one entry per measured biomarker |
antigenic_map_long |
arma::mat, the collapsed cross reactivity map for long term boosting, after multiplying by cr_long see |
antigenic_map_short |
arma::mat, the collapsed cross reactivity map for short term boosting, after multiplying by cr_short, see |
antigenic_distances |
NumericVector, the collapsed cross reactivity map giving euclidean antigenic distances, see |
boost_before_infection |
bool to indicate if calculated antibody level for that time should be before the infection has occurred, used to calculate antibody-mediated immunity |
NumericVector of predicted antibody levels for each entry in biomarker_id_indices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.