A dynamic epidemiological-economic model of livestock infectious diseases.
Ângelo Mendes,1
Dan Haydon,1
Emma McIntosh,2
Nick Hanley,1
Jo Halliday.1
1Institute of Biodiversity, Animal Health and Comparative Medicine, University of Glasgow, Glasgow, UK.
2Institute of Health and Wellbeing, University of Glasgow, Glasgow, UK.
This Shiny app demonstrates the importance of integrating epidemiology and economics in models of livestock infectious diseases. All simulations are based on a standard deterministic and compartmental epidemiological model. The basic model features are (i) two states (susceptible and infected), (ii) equal birth and death rates, (iii) constant herd size, and (iv) a transmission rate reflecting an endemic equilibrium. Disease transmission can occur within-farm only or both within and between farms. The simulation assumes an awareness-raising event (of an information campaign) at time zero, with a subsequent effort to control the disease by the farmer. Control actions taken by farmers are represented in the model through reductions in transmission rate. Once the simulation parameters are set up (first dashboard item), the following functionalities can be explored:
i) Understanding the impact of a farmer type on disease control: the model allows the user to simulate disease prevalence over time in three different farms and to examine the consequences of farmer heterogeneity on disease control;
ii) Quantifying the off-farm effects of farmers' action to control the disease: the generation of externalities is demonstrated by attributing a monetary value to the cost of an infected animal and quantifying the total averted cost in one farm as a result of actions taken in another farm;
iii) Predicting prevalence over time in a scenario of optimal control effort from the farmer's perspective: behavioural optimisation from the perspective of the farmer is represented in the model through reductions in transmission that minimise the total cost of the disease (sum of prevention expenditure, treatment cost and output loss).
This app was developed with shiny version 1.4.0 (Chang et al., 2019) and shinydashboard version 0.7.1 (Chang and Ribeiro, 2018) in R version 3.6.2 (R Core Team, 2018). The differential equations are solved with the package deSolve version 1.27.1 (Soetaert et al., 2010). All plots are generated with ggplot2 version 3.2.1 (Wickham, 2016).
This app was supported by the University of Glasgow’s Lord Kelvin/Adam Smith (LKAS) PhD Scholarship.
To report a bug, please contact a.mendes.1@research.gla.ac.uk .
For more information, read the full paper (here).
References:
Chang W, Cheng J, Allaire JJ, Xie Y, McPherson J. shiny: Web Application Framework for R. R package version 1.4.0. 2019.
Chang W, Ribeiro BB. shinydashboard: Create Dashboards with 'Shiny'. R package version 0.7.1. 2018.
R Core Team. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. 2018.
Soetaert K, Petzoldt T, Setzer RW. Solving Differential Equations in R: Package deSolve. Journal of Statistical Software. 2010;33(9):25.
Wickham H. ggplot2: Elegant Graphics for Data Analysis.: Springer-Verlag New York; 2016.
General conditions
Simulation parameters that are applicable throughout the simulations
Input
Additional information:
The above input parameters are used in the three model applications: 1. Farmer heterogeneity; 2. Externalities; and, 3. Optimised control effort. The model’s differential equations are as follows: $$\frac{dS_i}{dt} =\ \alpha(S_i+I_i)-(1-q)(1-\ r_i^\beta) \beta S_iI_i - q\beta S_i\sum_{j=1\atop j\ne i}^{n}I_j - \mu S_i \ \qquad\qquad(1)$$ $$\frac{dI_i}{dt} =\ (1-q)(1-\ r_i^\beta) \beta S_iI_i + q\beta S_i\sum_{j=1\atop j\ne i}^{n}I_j - \mu I_i \ \qquad\qquad\qquad\qquad\qquad(2) $$
Where\(\ {S} \) and\(\ {I} \) are the number of susceptible and infected animals at the farm, respectively. The user can change these by moving the first two sliders above. The second slider (initial proportion of infected animals) also determines the initial within-farm transmission rate\(\ \beta \) as it is assumed that the disease is in endemic equilibrium at the beginning of the simulation. The reciprocal of the "average animal lifespan" gives the birth rate\(\ \alpha \) , which is equal to the death rate\(\ \mu \). q is chosen by the user in a scenario of transmission within and between farms (externalities), but it is 0.0 otherwise, i.e. in a scenario of transmission within farms only (farmer heterogeneity and optimised control effort). \(\ {r_i^\beta} \) is a proportionate reducer on β that represents the amount of control effort applied on farm.
Farmer heterogeneity
Examining the impact of farmer type on disease prevalence
Input
Output
Additional information:
Here, we examine the effect of farmer heterogeneity on disease prevalence following a common starting prevalence and a hypothetical awareness-raising event (at time zero). Left : control effort applied (percentage reduction in transmission rate - β - within the farm in relation to the initial β in endemic equilibrium) as a function of disease prevalence in three different farms; the vertical dash-dotted line indicates initial prevalence. Right : disease prevalence over time in three different farms. The grey shaded area indicates the target prevalence level (below 2%).
In farm\(\ {i} \), the amount of control effort is represented by the reduction in transmission rate\(\ r_i^\beta \), as follows: $$\ \ r_i^\beta \ =\frac{1}{1+e^{-100(p_i- \gamma_i )}}$$
where\(\ \gamma \ \)can be chosen for each farmer as an input parameter by the user to represent the responsiveness level of each farmer type as a function of current prevalence\(\ {p} \) value. It is assumed that, as the prevalence at the farm declines, the control effort applied also falls. However, using the radio button, the user can invert the slope of the logistic function to analyse the outcome when the control effort applied is increased as the prevalence at the farm drops.
Externalities
Quantifying the off-farm effects of disease control action
Input
Output
Additional information:
Here, we can compare the off-farm effects of control actions taken by farmers A and C (left plot). It is assumed that only farmer A takes control action, which depends on the behavioural parameter\(\ \gamma \ \)chosen in the first simulation tab (farmer heterogeneity). Farmer C does not take any control action (independent of the parameter\(\ \gamma \ \)chosen in the first simulation tab). This simulation allows the user to visualise the generation of externalities as a result of livestock disease control (main plot above) and estimate the associated private (in farm A) and social (farms A and C) benefits and costs (see table in section below). Here, the user can choose the ex post cost of the disease per infected animal and the ratio of between-to-within-farm transmission rates.
The first input slider enables the user to set the ex post cost of the disease per infected animal between 20 and 80 monetary units per timestep.
The second input slider enables the user to set the between-farm transmission rate (bβ) from 100 times smaller (0.01) to equal (1.00) to the within-farm transmission rate (wβ). The two plots on the right track wβ and bβ over time. To ensure that the disease is in endemic equilibrium at the start of the simulation in the scenario of transmission between farms (bβ > 0), the initial wβ is updated numerically. Control actions taken by each farmer in their farms only reduce the wβ. The bβ is kept constant over time. By holding the bβ constant over time and at a common value for the two farms, we can estimate the off-farm effects of on-farm actions only.
Private and social benefits and costs of disease control
Input
Output
Additional information:
This table shows the prevalence (prev.) in farm A and C, as well as the discounted benefits and costs attributable to disease control action in farm A for a maximum of 25 time units. Note that the prevalence values (columns two and three in the table above) correspond to the proportion of infected animals at the start of each time step. The discounted benefits and costs (columns four to seven in the table above) are measured at the end of each time step. The user can then compare the net profit\(\ {\pi} \) of farmer A (NPV, net present value, in farm A) with the social net profit (social NPV), which is the sum of the private net profits of farmers A and C.
The discounted benefits\(\ B_{ti} \) and the discounted costs\(\ C_{ti} \) in farm\(\ {i} \) at time\(\ {t} \), as well as the profit\(\ {\pi_i} \) (for the whole simulation) in NPV are calculated as follows: $$\ \ B_{ti} \ =\frac{\ \delta \ .b_{ti}}{(1+d)^t}$$
$$\ \ C_{ti} \ =\frac{\ \theta \ .r_i^\beta}{(1+d)^t}$$
$$\ \ {\pi_i} \ =\ {\sum_{t=1}^{n}(B_{ti} - C_{ti})} $$
where\(\ {\delta} \) is the ex post cost per infected animal (treatment expenditure and output loss), as set up in the section above, \(\ {b_{ti}} \) is the number of infected animals averted in farm\(\ {i} \) at time\(\ {t} \), \(\ {\theta} \) is the unit price of control action (the price of reducing the transmission rate by 1%), given by the first input slider in this section, \(\ {d} \) is the discount rate (%), given by the second input slider also in this section, and,\(\ r_i^\beta \) is the amount of control effort in farm\(\ {i} \), which depends on the behavioural parameter\(\ \gamma \ \)chosen by the user in the first simulation tab (farmer heterogeneity) for farmer A. In this simulation, farmer C does not take control action, so \(\ r_c^\beta = 0\).
Optimised control effort
Demonstrating the effect of optimal control effort from farmers' perspective
Input
Output
Additional information:
Here, we can estimate the prevalence over time (left output plot) assuming that the farmer optimises their control action. Optimised control action means that the farmer reduces the transmission rate at each time step so that the total cost of disease (the sum of ex ante and ex post costs) is minimum. The user can change the price of control per unit and the cost per infected animal. The right output plot shows that, as prevalence drops, the cost of reducing the prevalence by an additional unit (1%) increases - the farmer becomes then gradually less motivated to reduce prevalence any further until it reaches an epidemiological-economic equilibrium. The grey shaded area indicates the target prevalence level (below 2%).