runs the ODE Cysticercosis model

run_model(
  params = NULL,
  initial_states = NULL,
  time,
  intervention = NULL,
  intervention_time = time/2,
  intervention_effect = intervention_effect_size(),
  step = 1/30,
  burn_in = 0
)

Arguments

params

List of model parameters

initial_states

List of intitial state values

time

The number of years to run the model for (from equilibrium). Default is at the halfway point.

intervention

A vector of interventions to include from: Husbandry, Sanitatio, Inspection, Pig_MDA, Pig_vaccine and Human_test_and_treat

intervention_time

Timing of intervention

intervention_effect

A list of intervention effect sizes, see intervention_effect_size for details

step

time step (months)

burn_in

A burn in period run before model run (years)

Examples

# run the baseline model: M1 <- run_model(time = 50, burn_in = 50) plot(M1$t / 12, M1$Humans_Cysticercosis, t = "l", ylim = c(0, 1000), ylab = "Humans with Cysticercosis", xlab = "time (years)")
# run the model with a single intervention: M2 <- run_model(time = 50, intervention = "Sanitation", intervention_time = 20, burn_in = 50) lines(M2$t / 12, M2$Humans_Cysticercosis, col = "deeppink")
# run the model with multiple interventions: M3 <- run_model(time = 50, intervention = c("Human_test_and_treat", "Pig_MDA"), intervention_time = 20, burn_in = 50) lines(M3$t / 12, M3$Humans_Cysticercosis, col = "dodgerblue")
legend("topright", c("Baseline", "Sanitation", "Human test & treat and Pig MDA"), lty = c(1, 1, 1), col = c("black", "deeppink", "dodgerblue"))