sircn: Susceptible-infected-recovered (SIR) differential equation...

Description Usage Details Author(s) References See Also Examples

Description

This is a susceptible-infected-recovered (SIR) differential equation model on a configuration network.

Usage

1

Details

dθ(t)/dt = -β θ(t)+β(ψ'(θ(t))/ψ'(1))+γ(1-θ(t))

S(t) = ψ(θ(t))

I(t) = 1-S(t)-R(t)

dR(t)/dt = γ I

The state variables of the model are as follows.

θ

The fraction of degree one nodes that are susceptible.

S

The fraction of nodes that are susceptible.

I

The fraction of nodes that are infected.

R

The fraction of nodes that are recovered.

The parameters of the model, and the values used in the example, are as follows.

Symbol Description Value
β Infectivity parameter 0.1
γ Recovery rate 0.05
k Mean of Poisson-distributed degree distribution 5

Author(s)

Simon Frost (sdwfrost@gmail.com)

References

1

Volz, E.M. (2008) SIR dynamics in random networks with heterogeneous connectivity.Mathematical Biology 56:293-310.

2

Decreusefond, L., Dhersin, J.-S., Moyal, P., and Tran, V.C. (2012) Large graph limit for an SIR process in random network with heterogeneous connectivity. Annals of Applied Probability 22:541-575.

See Also

sirode.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
sir.cn.ode <- new("odeModel",
  main = function(time, init, parms, ...){
    with(as.list(c(init,parms)),{
      dtheta <- -beta*theta+beta*(dpsi(theta,k)/dpsi(1,k))+gamma*(1-theta)
      S <- psi(theta,k)
      I <- 1-S-R
      dR <- gamma*I
      list(c(dtheta,dR))
    })},
  equations = list(),
  parms = c(beta=0.1,gamma=0.05,k=5),
  times = c(from=0,to=125,by=0.01),
  init = c(theta=0.999,R=0),
  solver = "lsoda"
)
poisgn <- list(
  psi = function(theta,k){theta^k},
  dpsi = function(theta,k){k*theta^(k-1)},
  dpsi2 = function(theta,k){k*(k-1)*theta^(k-2)}
)
equations(sir.cn.ode) <- poisgn
sir.cn.ode <- sim(sir.cn.ode)
sir.cn.out <- out(sir.cn.ode)
sir.cn.out$S <- sir.cn.out$theta^parms(sir.cn.ode)[["k"]]
sir.cn.out$I <- 1-sir.cn.out$S-sir.cn.out$R

reconhub/epicookbook documentation built on May 27, 2019, 4:02 a.m.