Description Usage Arguments Value
Generate new infections given contact matrix and indices of people who are infectious. Restricts the contact matrix ('contact.mat') to include only those columns corresponding to infectious people based on 'inf.ind' Then goes through each row and performs a bernoulli trial based on the transmission probability in each cell Equivalent to a chance of infection for every contact if contact exists (else the cell is 0)Returns a vector of row indicies corresponding to new infections to enter the E compartment Infection multiplier allows alteration of the infection probability, e.g. if contacts are with asymptomatics and want to model reduced infectiousness
1 | new_infection(contact.mat, inf.ind, inf.multiplier)
|
contact.mat |
matrix representing contact network where entries are transmission probabilities |
inf.ind |
indices of individuals who are infectious. Matrix will be subset to these columns to simulate infectious contacts |
inf.multiplier |
multiplier to apply to the infection probabilities in the matrix e.g. to simulate reduction in infectiousness among asymptomatic individuals |
vector of indicies of new infections (e.g. people who have moved from S to E)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.