# Creating a mixing model
mymodel <- ModelSIRMixing(
name = "My model",
n = 10000,
prevalence = .001,
contact_rate = 10,
transmission_rate = .1,
recovery_rate = 1 / 7,
contact_matrix = matrix(c(.9, .1, .1, .9), 2, 2)
)
ent1 <- entity("First", 5000, FALSE)
ent2 <- entity("Second", 5000, FALSE)
mymodel |>
add_entity(ent1) |>
add_entity(ent2)
run(mymodel, ndays = 100, seed = 1912)
summary(mymodel)
Run the code above in your browser using DataLab