DOI: 10.5061/dryad.kh18932fw
title: Data from: The basic-reproduction number of infectious diseases in spatially structured host populations

description: The spatial structure of a host population has a profound effect on the
 dynamics of infectious diseases. The basic reproduction number, a central
 quantity in the study of epidemic dynamics, is affected by host clustering
 as well as host density. Several authors have developed methods to
 quantify the basic reproduction number in a spatially structured host
 population. The methods used and the expressions derived are however
 difficult to apply to real life spatial host structures. In this paper we
 introduce an explicit expression for the basic reproduction number using
 the O-ring statistic, developed in spatial statistics, that quantifies the
 host density as a function of the distance from a randomly selected host
 individual. The O-ring statistic is frequently used in the study of the
 ecology of spatially structured plant populations, being a convenient
 summary of the properties of a landscape by way of a single function. The
 connection we develop between spatial statistics and epidemic dynamics can
 be used to study the effect of host spatial pattern on the basic
 reproduction number of infectious diseases. As well as showing how
 explicit expressions for the basic reproduction number can be derived for
 landscapes with standard structures, our expression for the basic
 reproduction number is tested against a simulation model. The model
 structure in our simulation is motivated by the spread of a plant disease
 epidemic, although it is applicable more broadly. The agreement between
 our analytic expression for the basic reproduction number and the
 corresponding numeric quantity extracted from simulations is close to
 perfect across a wide range of landscape structures and model
 parameterisations, and including cases in which more than one species of
 host is at risk of infection.
description: The dataset is computer code supporting the article "The
 basic-reproduction number of infectious diseases in spatially structured
 host populations" in Oikos by van den Bosch, Helps &
 Cunniffe.
description: # Data from: The basic-reproduction number of infectious diseases in
 spatially structured host populations
 [https://doi.org/10.5061/dryad.kh18932fw](https://doi.org/10.5061/dryad.kh18932fw) Computer code to support the above-named article. ## Description of the data and file structure Files provided include two .c files and one .h file which can be compiled to create an executable to simulate epidemics using a stochastic individual based model. The .cfg file (as well as command line flags) can be altered to affect the parameterisation of this simulation. There are also three .R files; running one creates a host landscape for the epidemic simulation; the other two can be used to calculate R0 using the methods set out in our paper, and to calculate the same quantity numerically by fitting a (multi-species) branching process model (i.e., a way of checking that the analytic method gives reliable results). ## Sharing/Access information The code is also available at  * [https://github.com/nikcunniffe/rZeroORing](https://github.com/nikcunniffe/rZeroORing) Note that compiling the EpidemicSim.c file requires a C implementation of the Mersenne Twister. In doing the runs underneath the paper, a modified version of mt19937ar was used. This was originally written by Takuji Nishimura and Makoto Matsumoto, and cannot be released under a CC0 licence. However, a copy of the files used - with an appropriate copyright declaration - is hosted at [https://doi.org/10.5281/zenodo.11244650](https://doi.org/10.5281/zenodo.11244650)  ## Code/Software The pipeline for creating landscape(s), running epidemics and calculating R0 is described below. 1. Compile EpidemicSim.exe from EpidemicSim.c and mt19937ar.c 2. Create directory to do the runs 3. Copy the following files to directory created in step 2 * EpidemicSim.cfg * EpidemicSim.exe * create_LS.R * rZero_From_Sims.R * rZero_Function.R 4. Create the following subdirectories of directory created in step 2 * Inputs * Outputs 5. Start R and change to the directory created in step 2 using setwd() 6. Run create_LS.R * Options for landscape generation are in the R file * Running it will fill up Inputs subdirectory 7. Run EpidemicSim.exe on command line * Options for epidemics are in the EpidemicSim.cfg files * will fill up Outputs subdirectory 8. Run rZero_From_Sims.R * will print estimated and calculated rZero to the screen