# NOT RUN {
# To run the simulation with default parameters, just call the function:
result <- simulate_sirdemographic_stochastic()
# To choose parameter values other than the standard one, specify them like this:
result <- simulate_sirdemographic_stochastic(S = 2000, tmax = 200, b = 0.01)
# You can display or further process the result, like this:
plot(result$ts[,'time'],result$ts[,'S'],xlab='Time',ylab='Number Susceptible',type='l')
print(paste('Max number of infected: ',max(result$ts[,'I'])))
# }
Run the code above in your browser using DataLab