# SEIR Connected model
seirconn <- ModelSEIRCONN(
name = "Disease",
n = 10000,
prevalence = 0.1,
contact_rate = 2.0,
transmission_rate = 0.8,
incubation_days = 7.0,
recovery_rate = 0.3
)
set.seed(937)
run(seirconn, 50)
# Get the transition history
t_hist <- get_hist_transition_matrix(seirconn)
head(t_hist)
# Convert to array
as.array(t_hist)[, , 1:3]
# Plot incidence
inci <- plot_incidence(seirconn)
Run the code above in your browser using DataLab