# NOT RUN {
# generate 100 X-Y coordinates for a distance-based ILM
x <- runif(100, 0, 10)
y <- runif(100, 0, 10)
# Suppose we know the length of infectious period for each individual. Also, assume
# susceptibility parameter = 1.5 and spatial parameter = 5 for this SIR model
infperiod <- rep(3, 100)
# For a 1000 iteration with a last observed time point 15, we can estimate the basic
# reproduction number using Monte Carlo simulation
out <- epiBR0(x = x, y = y, sus.par = 1.5, beta = 5, infperiod= infperiod,
tmax = 15, niter = 1000)
out$BasicR0
# }
Run the code above in your browser using DataLab