sirChainmod | R Documentation |
Gradient-function for the chain-SIR model
sirChainmod(t, logx, parameters)
t |
Implicit argument for time |
logx |
A vector with values for the log-states |
parameters |
A vector with parameter values for the chain-SIR system |
A list of gradients
require(deSolve) times = seq(0, 10, by=1/52) paras = c(mu = 1/75, N = 1, beta = 625, gamma = 365/14, u=5) xstart2 = log(c(S=.06, I=c(0.001, rep(0.0001, paras["u"]-1)), R = 0.0001)) out = as.data.frame(ode(xstart2, times, sirChainmod, paras))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.