siragemod: Gradient-function for the age-structured SIR model with...

Description Usage Arguments Value Examples

View source: R/rfuncs.R

Description

Gradient-function for the age-structured SIR model with possibly heterogeneous mixing

Usage

1
siragemod(t, logx, parms)

Arguments

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

Value

A list of gradients

Examples

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))

epimdr documentation built on March 26, 2020, 7:41 p.m.

Related to siragemod in epimdr...