sirmod {epimdr}R Documentation

Gradient-function for the SIR model

Description

Gradient-function for the SIR model

Usage

sirmod(t, y, parms)

Arguments

t

Implicit argument for time

y

A vector with values for the states

parms

A vector with parameter values for the SIR system

Value

A list of gradients

Examples

require(deSolve)
times  = seq(0, 26, by=1/10)
paras  = c(mu = 0, N = 1, beta =  2, gamma = 1/2)
start = c(S=0.999, I=0.001, R = 0)
out=ode(y=start, times=times, func=sirmod, parms=paras)

[Package epimdr version 0.6-5 Index]