Description Usage Arguments Value Examples
Gradient-function for the age-structured SIR model with possibly heterogeneous mixing
1 |
t |
Implicit argument for time |
logx |
A vector with log-values for the log-states |
parms |
A vector with parameter values for the age-structured SIR system |
A list of gradients
1 2 3 4 5 6 7 | a=rep(1,4)
n=length(a)
betaM=matrix(1, ncol=4, nrow=4)
pars =list(N=1, gamma=365/14, mu=0.02, sigma=0.2, beta=500, betaM=betaM,p=rep(0,4), a=a)
xstart<-log(c(S=rep(0.099/n,n), I=rep(0.001/n,n), R=rep(0.9/n,n)))
times=seq(0,10,by=14/365)
out=as.data.frame(ode(xstart, times=times, func=siragemod, parms=pars))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.