Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

epimdr (version 0.6-5)

chainSIR: Gradient-function for the chain-SIR model

Description

Gradient-function for the chain-SIR model

Usage

chainSIR(t, logx, params)

Arguments

t

Implicit argument for time

logx

A vector with values for the log-states

params

A vector with parameter values for the chain-SIR system

Value

A list of gradients

Examples

Run this code
# NOT RUN {
require(deSolve)
times  = seq(0, 10, by=1/52)
paras2  = 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, paras2["u"]-1)), R = 0.0001))
out = as.data.frame(ode(xstart2, times, chainSIR, paras2))
# }

Run the code above in your browser using DataLab