In order to compare invasion and persistence probabilities between different contact–density functions, we used a stochastic discrete time version of this SIR model, where the transition rates between categories were modelled stochastically, resulting in two possible stochastic events: infection (decrease of S, increase of I) and recovery (decrease of I, increase of R). Events were assumed to occur continuously in time at a certain rate, and were modelled using the ‘adaptive tau-leap’ algorithm described in . Briefly, each short time-step δt, the number of events of each type (infection or recovery) that occurs is randomly drawn from a Poisson distribution with mean riδt, where ri is the rate of each type of event i. If the number of simulated events would cause any of the categories (S, I or R) to fall below 0, δt is halved and new events are drawn (=‘adaptive tau-leap’).