clust_sim_SIR_unif: clust_sim_SIR_unif

View source: R/clust_sim_SIR_unif.R

clust_sim_SIR_unifR Documentation

clust_sim_SIR_unif

Description

clust_sim_SIR_unif simulates the spread of an infectious disease on a social network using the Susceptible-Infected-Removed compartmental model with one uniform interaction per dyad per day in parallel for a given number of iterations.

Usage

clust_sim_SIR_unif(network_el, beta, gamma, days, iters, free_threads = 1)

Arguments

network_el

an edgelist file generated by igraph

beta

a value from 0 to 1 indicating per contract probability of pathogen transmission

gamma

a value from 0 to 1 indicating daily probability of recovery/removal

days

the maximum number of days for which your simulation will run

iters

the number of times to replicate simulations

free_threads

the number of computing threads to be left unused by simulations (e.g. for doing other tasks while simulations are running.)

Value

a matrix with the same number of columns as argument 'iters', where each column represents an iteration, and each row represents 1: number of days simulation went for, 2: final number of susceptible individuals, 3: final number of infected individuals, 4: final number of number of removed individuals, 5: maximum number of infected inviduals at any timepoint, in that order.


collinmmccabe/enss documentation built on May 5, 2024, 6:23 a.m.