View source: R/simplified_gillespies.R
Possible states and their respective logical representations. Summarise in matrix Initial state of each individual Initial state of epidemic at population level Possible Events Summarise in a matrix Panel Data Waiting Time Panel Data Convert individualStates into panelData currentState = sapply(X = 1:N, function(X) which(individualStates[X,])) Which event happens? To who? Update Population State Update Individual State Convert individualStates into panelData
1 2 3 4 5 6 7 8 | panelDataSIR_Gillespie(
initialState,
beta,
gamma,
obsTimes,
kernel,
replace = F
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.