Gradient-function for the SIRWS model
sirwmod(t, logy, parms)
Implicit argument for time
A vector with values for the log(states)
A vector with parameter values for the SIRWS system
A list of gradients (in log-coordinates)
# NOT RUN {
require(deSolve)
times = seq(0, 26, by=1/10)
paras = c(mu = 1/70, p=0.2, N = 1, beta = 200, omega = 1/10, gamma = 17, kappa=30)
start = log(c(S=0.06, I=0.01, R=0.92, W = 0.01))
out = as.data.frame(ode(start, times, sirwmod, paras))
# }
Run the code above in your browser using DataLab