Exploring the impact of parameter changes

Overview

This app allows you to explore the effect of specific model parameters on some outcomes of interest for the simple bacteria model. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.

The Model

Model Overview

The model used here is the SIR model with births and deaths. It is also used and described in the stochastic SIR app. This model tracks susceptibles, infected/infectious and recovered hosts. The following compartments are included:

The included processes/mechanisms are the following:

Model Implementation

The flow diagram for the model implemented in this app is:

Flow diagram for this model.

Flow diagram for this model.

The deterministic model implemented as set of differential equations is given by the following equations:

\[\dot S = m - bSI - nS\] \[\dot I = bSI - gI - nI\] \[\dot R = gI - nR\]

This is almost the same model as the basic SIR model from the introductory app, with the only difference that this model also allows natural births and deaths.

Model exploration

The new component implemented for this app is the ability to systematically run the simulation multiple times as you scan of values for a specific parameter. Instead of running the simulation once for a given choice of parameter values and looking at the resulting time-series, this app lets you explore the impact of each model parameter on some outcomes. Specifically, we consider the maximum and final value of each variable.

In the app, those outcomes of interest are labeled Smax, Imax, Rmax and Sfinal, Ifinal, Rfinal. You can choose one of the model parameters to be varied between some minimum and maximum value. The other parameter values remain fixed. For each parameter value, the model is run and the outcomes of interest computed. The resulting plot is one showing how those outcomes of interest vary with the parameter you investigated.

While you can do that with some of the other apps too, by manually changing parameters, re-running the simulation, and recording results, this is done here in an automated way. Exploring models in this way, and presenting plots showing how some outcome(s) of interest vary with a specific parameter, is a very common way models are used in research.

What to do

The tasks below are described in a way that assumes everything is in units of days (rate parameters, therefore, have units of inverse days).

Task 1

Task 2

Task 3

With enough practice, it is often possible to intuit specific results based on the underlying equations - but that requires a good bit of modeling practice. As models get more complicated, even experienced modelers can often not intuit what model behavior one should expect as specific parameters vary. Often the only way to find out is by actually running the simulations.

Task 4

The model we have here is so simple that we can in fact figure out some of the outcomes shown in the plot without having to run simulations but instead by doing some math. Specifically, we can compute the steady states for the different variables. This was one of the tasks in the Patterns of ID app. We repeat it here.

Once the system has settled down, there are no more changes in the numbers for each compartment. Mathematically, that means that the left side of the differential equations becomes 0, and they turn into the following algebraic equations: \(0 = m - bSI - nS\), \(0 = bSI - gI - nI\) and \(0 = gI - nR\). One can solve those equations for each of the compartments to get a mathematical expression of what S/I/R are at steady state. Try to do this. You should find that Ssteady = (g+n)/b and a similar equations for the other variables.

Task 5

We cannot compute similar mathematical expressions for the maximum values of the variables. In general, as soon as our model reaches a certain level of complexity (maybe around 5 equations and more), getting analytic/mathematical equations for most outcomes of interest is not possible and the numerical approach of running the simulations and looking at the results is the only option we have.

Task 6

Task 7

Task 8

Note that here we focus on a single parameter at a time. With some coding effort, we could change the underlying simulation to loop over say 2 parameters and produce outcomes for sets of parameter values. The results could be plotted as a 2-dimensional heatmap for each outcome. While this could be extended to more than 2 parameters, it will become hard to visualize and long to run. If there are many parameters that could change, a different approach is useful, which you’ll learn about in the Uncertainty and Sensitivity App.

Further Information

References