This immunity model should only be used if all exposures are vaccination events. The probability of successful exposure (vaccination event) depends on the number of vaccines an individual has received prior to time t. If the individual is under the maximum vaccinations allotted then the probability of successful exposure event is 1.

immunity_model_vacc_only(
  i,
  t,
  x,
  immune_histories,
  biomarker_states,
  demography,
  biomarker_map,
  model_pars,
  max_vacc_events,
  vacc_age,
  ...
)

Arguments

i

integer for the individual ID

t

integer for the time period

x

integer for the exposure ID

immune_histories

a 3D array of immune histories for all individuals, time steps and exposure IDs

biomarker_states

an 3D array of biomarker states (biomarker quantities) for all individuals, time steps and biomarker IDs

demography

a tibble of demographic information for each individual in the simulation

biomarker_map

a table specifying the relationship between exposure IDs and biomarker IDs

model_pars

a tibble of parameters needed for the immunity model

max_vacc_events

a vector of the maximum number of vaccination events possible for each exposure type; If an exposure type is not a vaccination event then input NA

vacc_age

a vector of the minimum age at which an individual is eligible for vaccination for each exposure event; If an exposure event is not a vaccination event then input NA

...

Additional arguments

Value

The probability of successful exposure

Examples

tmp_immune_history <- array(0, dim=c(1, 10, 1))
tmp_immune_history[1,1,1] <- 1
tmp_demography <- dplyr::tibble(i=1, birth=1)
immunity_model_vacc_only(1,8,1,tmp_immune_history,NULL, tmp_demography,NULL, 
NULL,max_vacc_events=2,vacc_age=5)
#> [1] 1