For clarity, we expressed β in terms of the basic reproductive number, R0 (where β = R0·γ). Note that R0 is defined as the mean number of secondary infectious cases caused by a single infectious case in an otherwise completely susceptible community [22] . At the time of the scheduled periodic mass treatments, we assume that each infected individual has a probability c of being treated (the effective coverage), with the number of infections post treatment being drawn from the corresponding binomial distribution.
Parameters for this stochastic model were fitted to baseline and 6-month data for each country using maximum likelihood estimation. We initiated simulations at the average prevalence for that region, and simulated the Kolmogorov-forward equations for 40 years to allow the distribution of prevalence to approximate the pre-treatment distribution at time point zero. We also initiated the model at the observed 2-month prevalence and simulated the equations for 4 months to estimate the expected distribution of prevalence at 6-months. The total log-likelihood was the sum of the baseline and the 6 month log-likelihoods for each of the communities in the area. Note that any event that occurred between baseline and 2-months (such as treatment, or mass re-infection from travel) would not bias these results [8] (link). Based on these Kolmogorov equations, the values of the parameters R0, standard deviation of R0 (thus treating R0 as a random effect), γ, and ν that maximized the probability of obtaining the observed baseline and 6-month data for that country (i.e. the likelihood) were determined using an iterative, hill-climbing algorithm. Numerical optimizations were repeated a minimum of 4 times from random starting points (because of the possibility any single run could converge to a local, rather than the global, maximum); each iteration converged to the same value. Furthermore, a grid search did not reveal any greater maxima.
The variance of these estimates was assessed by inverting the Hessian of the log-likelihood evaluated at the maximum likelihood estimate (although note that the 95% confidence interval could not include ν = 0, because in each country, a community went from 0 infections at 2 months to >0 infections at 6 months). Coverage was assumed to be 80%, and the average population size was set at the mean of empirical results from the surveyed communities in that region (