View source: R/simulate_data.R
simulate_individual_faster | R Documentation |
FOR USERS: USE simulate_individual
. This function does the same thing, but with a few short cuts for speed. Simulates a full set of titre data for an individual with known theta and infection_history.
simulate_individual_faster(
theta,
infection_history,
antigenic_map_long,
antigenic_map_short,
antigenic_distances,
sampling_times,
strain_isolation_times,
measured_strains,
mus = NULL,
mu_indices = NULL,
measurement_bias = NULL,
measurement_indices = NULL,
add_noise = TRUE,
repeats = 1,
DOB = NULL
)
theta |
the named parameter vector |
infection_history |
the vector of 1s and 0s giving presence/absence of infections |
antigenic_map_long |
the long term antigenic cross reactivity map generated from |
antigenic_map_short |
the short term antigenic cross reactivity map generated from |
antigenic_distances |
same dimensions as antigenic_map_long and antigenic_map_short, but gives the raw euclidean antigenic distances |
sampling_times |
vector of times at which blood samples were taken |
strain_isolation_times |
(optional) If no antigenic map is specified, this argument gives the vector of times at which individuals can be infected |
measured_strains |
vector of which strains had titres measured in 'strain_isolation_times' |
mus |
default NULL, optional vector of boosting parameters for each strain |
mu_indices |
default NULL, optional vector giving the index of 'mus' that each strain uses the boosting parameter from. eg. if there are 6 circulation years in strain_isolation_times and 3 strain clusters, then this might be c(1,1,2,2,3,3) |
measurement_indices |
default NULL, optional vector giving the index of ‘measurement_bias' that each strain uses the measurement shift from from. eg. if there’s 6 circulation years and 3 strain clusters, then this might be c(1,1,2,2,3,3) |
add_noise |
if TRUE, adds observation noise to the simulated titres |
repeats |
number of repeat observations for each year |
a data frame with columns samples, virus and titre of simulated data
Other simulation_functions:
simulate_attack_rates()
,
simulate_data()
,
simulate_group()
,
simulate_individual()
,
simulate_infection_histories()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.