Sets up a large list of pre-indexing and pre-processing to speed up the model solving during MCMC fitting.

setup_titredat_for_posterior_func(
  titre_dat,
  antigenic_map = NULL,
  strain_isolation_times = NULL,
  age_mask = NULL,
  n_alive = NULL
)

Arguments

titre_dat

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); titre (integer of titre value against the given virus at that sampling time). See example_titre_dat

antigenic_map

(optional) a data frame of antigenic x and y coordinates. Must have column names: x_coord; y_coord; inf_times. See example_antigenic_map

strain_isolation_times

(optional) if no antigenic map is specified, this argument gives the vector of times at which individuals can be infected

age_mask

see create_age_mask - a vector with one entry for each individual specifying the first epoch of circulation in which an individual could have been exposed

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

Value

a very long list. See source code directly.

See also