twostrain | R Documentation |
Gradient-function for the two-strain SIR model
twostrain(t, y, parameters)
t |
Implicit argument for time |
y |
A vector with initial values for the states |
parameters |
A vector with parameter values for the two-strain SIR system |
A list of gradients
require(deSolve) times = seq(0, 30, by=1/200) paras = c(mu = 0.02, N = 1, beta1=500, beta2=750, gamma = 365/5, Theta=0.15, Xi=0.15, Pi=0.8) start = c(S = 0.999, I1 = 0.001, I2 = 0.00, R1=0, R2=0, J1=0, J2=0, R = 0) out = as.data.frame(ode(start, times, twostrain, paras))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.