Learn R Programming

epimdr (version 0.6-5)

NetworkSIR: Function to simulate an epidemic on a network

Description

Function to simulate a stochastic (discrete time) Reed-Frost SIR model on a social network

Usage

NetworkSIR(CM, tau, gamma)

Arguments

CM

a contact matrix

tau

the transmission probability

gamma

the recovery probability

Value

An object of class netSIR with infectious status for each node through time

Examples

Run this code
# NOT RUN {
cm1=BarabasiAlbert(N=200,K=2)
sim1=NetworkSIR(cm1,.3,0.1)
summary(sim1)
# }
# NOT RUN {
plot(sim1)
# }

Run the code above in your browser using DataLab