Description Usage Arguments Examples
View source: R/Model_wrappers.R
Runs the ODE Cysticercosis model
1 2 3 4 |
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_effect |
A list of intervention effect sizes, see |
step |
Time step (months) |
Burn_in |
A burn in period run before model run (years) |
1 2 3 4 5 6 7 8 9 10 11 12 | # 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 intevention:
M2<-Run_model(Time=50, Intervention='Sanitation', Intervention_time=20, Burn_in=50)
lines(M2$t/12, M2$Humans_Cysticercosis, col='red')
# 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='green')
legend('topright', c('Baseline','Sanitation','Human test & treat and Pig MDA'), lty=c(1,1,1), col=c('black','red', 'green'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.