powered by
Function to simulate a stochastic (discrete time) Reed-Frost SIR model on a social network
NetworkSIR(CM, tau, gamma)
a contact matrix
the transmission probability
the recovery probability
An object of class netSIR with infectious status for each node through time
# 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