Introduction

The reductionist approach to science will continue to play an important role in scientific inquiry and progress. However, there is increasing interest across disciplines in studying the multiple interacting components of a given system simultaneously. This stems from the realization that it is often the complex interactions among these components that determine the ultimate outcome. While complexity in immunology is readily acknowledged, in many cases the ability to measure the contribution of each component is challenging. Even where this can be achieved, it can be difficult to interpret the results by looking at individual components independently. Mathematical and computational modelling can provide valuable information on the relative importance of different immunological components, how they are influenced by other components and how these relationships may vary across conditions. Models can provide informed hypotheses for experimental testing, generate a comprehensive map of the integrated performance of the immune system and identify potential targets for clinical manipulation of the immune response.

In this Review, we provide an introduction and overview of one category of models: those based on mechanistic simulations of an underlying system of interest. Our primary goal is to familiarize immunologists with, and increase interest in, these kinds of models, and to provide enough information for readers to understand the strengths, weaknesses and uses of such models. For those interested in pursuing modelling further, we also provide some pointers for getting started with developing and using simulation models.

Types of models

Models are everywhere in science. Models can be conceptual, including verbal models, graphs or charts; can be experimental, such as a specific cell culture system or mouse strain; or may take the form of quantitative mathematical or computer models. Here we exclusively focus on the latter type of models.

The most common types of quantitative models are what we term phenomenological models (we avoid the often-applied term ‘statistical’ because the contrasting mechanistic models we focus on here can also be used in a statistical manner). Phenomenological models are applied to extract patterns or, more broadly, information from data. As such, whenever data are being analysed in some mathematical manner, this type of model is in play. Computing a correlation coefficient between two quantities of interest is an example of a very simple model that tries to detect a pattern. Regression models, in which a mathematical function is specified and the distance between the data and the function is minimized, also fall into this category1. In recent years, the increase of available data has led to greater use of more complex phenomenological models, which increasingly go by names such as machine learning or deep learning approaches2,3. These models do not explicitly describe the mechanisms by which patterns arise, and this is both a strength and a weakness. On the plus side, one can determine correlations, find patterns, deduce potential causation and make predictions without having to understand the underlying mechanisms governing a given system. The drawback is that such models provide, at best, hints regarding potential mechanisms. Especially for complex systems, one can often find correlations or patterns in the data without knowing whether these are indicative of mechanistic or causal connections (for some illuminating and entertaining examples, such as the strong correlation between divorces in Maine and the consumption of margarine, see ref.4).

To study mechanisms and processes, mechanistic models are ideal. One prominent type of such models uses simplified in silico representations of the processes underlying a system of interest to perform computer simulations. Other terms used for such models are systems models, dynamical models or simply mathematical models. In particular, the terms systems thinking and systems modelling have become popular in various fields during the past few decades5,6. These are not clearly defined terms, but in general, a systems perspective looks at multiple — often numerous — components that interact with each other in potentially complicated ways. Somewhat confusingly, the terms systems immunology and systems biology are also used to describe the analysis of complex data sets, such as high-dimensional -omics data using phenomenological models.

Mechanistic simulation models explicitly specify processes describing the mechanisms of interaction between system components. Usually, these models are highly simplified — but done well, still very powerful — abstractions of the system under study. Engineering and the hard sciences provide some of the best examples for this approach. For instance, equations describing electric circuits can be simulated to study and predict the behaviour of an actual electronic component. The advantage of this kind of model is that they can provide mechanistic insights, leading to a better and deeper understanding of the system, to a point where the model might allow for very precise predictions. The main disadvantage of this approach is that model construction requires considerable knowledge (or at least assumptions) about the system and how its components interact.

Both phenomenological and mechanistic models are useful tools with distinct advantages and disadvantages. Deciding which type of model to use depends on the question and study system. It is common to start with phenomenological models, to determine patterns and obtain clues regarding the underlying processes and mechanisms, and then to move to a mechanistic model to analyse those processes, their interactions and the resulting outcomes in more detail. In this Review, we will focus on mechanistic simulation models. For the purposes of this article, we will simply use the term ‘model’ to mean a model that describes the dynamics of the components of a system in an explicit and mechanistic way through mathematical equations or computational algorithms. Those models are generally studied by simulating them on a computer. There are different ways that such models can be implemented. The most common types used in immunology are compartmental models, in which each compartment tracks the size of a given biological entity of interest — for example, pathogen load or cytokine concentrations. The most common way to implement a compartmental model is with ordinary differential equations. We will therefore focus on those. Box 1 introduces compartmental models, while Box 2 briefly describes alternative modelling approaches.

Uses for models

There are different ways one can categorize the uses of mechanistic simulation models. Figure 1 shows one way of conceptualizing different model uses, namely for exploration (also called hypothesis generation), fitting (also called statistical inference) and prediction (also called forecasting). Often, a single project might involve more than one use of a model. We describe these different model uses below and then explain briefly how they are often used iteratively. To make things more tangible, we first introduce and describe two very simple models, one for viral (and other intracellular) infections, and one for extracellular bacterial infections. We then use these example models to illustrate different modelling tasks. We keep the two models purposefully very simple and generic; thus, they should not be considered as representing a detailed model for a specific pathogen (though, as we point out, models as simple as these have been successfully used to answer scientific questions of interest).

Fig. 1: Uses for mechanistic models.
figure 1

A schematic illustrating a way to categorize and conceptualize different uses of mechanistic models.

A simple model for viral infections

For the viral infection model, we track the numbers of infected and uninfected cells and the levels of free virus. Other details, such as any aspects of the immune response, are ignored in this simple construction. Figure 2a shows a graphic representation of such a model. The model shown in Fig. 2a can be translated into equations and computer code in several different ways. The most commonly used implementation is through a set of ordinary differential equations (ODEs). The equations for this model are shown in Fig. 2b. Once the model has been implemented on a computer and the values for the model parameters and variable starting conditions are specified, we can simulate the system. Figure 2c shows examples of different dynamics that can be obtained using this model. Despite its simplicity, this type of model has been successfully applied to the study of chronic infections, such as HIV and hepatitis C virus (HCV)7,8, and acute infections, such as influenza virus9,10,11,12,13. We discuss a few of these studies in some detail below.

Fig. 2: A simple model for viral infections.
figure 2

a | Diagram for a simple viral infection model. The model tracks changes over time for three quantities (the model variables/compartments); namely uninfected cells, infected cells and free virus. This model allows for the following processes to occur: uninfected cells are produced at rate n and die naturally at rate dU. Uninfected cells become infected by virus at rate b, which leads to the removal of a virion and an uninfected cell and the creation of an infected cell (the model term bUV). The extra g in front of this term in the virus equation allows one to account for different experimental units (plaque-forming units or similar measures for virus, versus number of cells) and to ensure that all units in the equations are consistent. Infected cells produce virus at rate p and die at rate dI. Free virus can infect new, uninfected cells or is cleared by the immune response and other mechanisms (for example, mechanical transport) at rate dV. b | Ordinary differential equation implementation for the simple virus infection model. Each equation tracks the change of a variable (compartment) over time. The left side denotes change of the specified variable with time. The right side describes the processes (also called flows) that lead to change. Positive inflows lead to increases in the variable, whereas negative outflows lead to decreases. Each term on the right side represents a specific biological mechanism — often in an abstract manner. c | Acute and chronic infection dynamics of the simple viral infection model. The variables labelled Ua, Ia and Va show the uninfected, infected and virus compartments for an acute infection. For an acute infection, one generally assumes that over the timescale of the infection, the natural death of cells and, most importantly, the creation of new uninfected cells is negligible, leading to n = dU = 0 in the model. This model can produce acute infection dynamics, but it does not allow for chronic infections. If one allows the ongoing creation (and, to prevent runaway growth, also background death) of cells, the model can produce a chronic infection scenario. This is shown by the variables labelled Uc, Ic and Vc. For the chronic infection scenario, we set the rate of production of new uninfected cells to n = 105 per day and the rate of natural death to dU = 0.1 per day (the inverse of which corresponds to the average lifespan of the cells, here 10 days; the half-life sometimes alternatively used contains an extra factor of log(2)). All other values are the same for the two scenarios. The initial conditions for the variables are U0 = 106 uninfected cells, I0 = 0 infected cells and V0 = 1 infectious virion. The parameter values are the virus production rate, p = 100 per infected cell per day; the death rate of infected cells, dI = 1 per day (corresponding to a 24-hour average lifespan); a virus clearance rate, of dV = 6 per day (virus lifespan of 4 hours); rate of infection of b = 10–6 per day; and conversion factor g = 1, which assumes that the model tracks virus in units of infectious virions. The model is simulated for 30 days.

Model for extracellular bacterial infections

For the bacterial infection model, we track bacteria and the immune response. The latter is implemented in an abstract manner; you can consider it to represent the total immune response or a specific component of importance for a given system. The model is a type of predator–prey model in which the bacteria are the prey and the immune response is the predator. Such models have been widely used in ecology14. Figure 3a shows a graphic representation of such a model, and Fig. 3b shows the set of ODEs corresponding to this model. Figure 3c shows two model simulations using different parameter values. The steep oscillations seen in bacterial load and immune response for the first scenario are biologically unrealistic, as is the fact that the number of bacteria drops below 1 (a feature of ODE models that is important to note and potentially to address; see Box 2). The second scenario, with different parameter values, is more likely to capture the basic dynamics for a real infection process. It is sometimes possible that a model does not produce outcomes that are consistent with the data for any choice of biologically reasonable model parameter values and starting conditions. This means that you have not yet captured all the important mechanisms and processes governing the system under study, and thus the model needs further refinement. We discuss this further below. Models like this have been applied to study of the dynamics of Mycobacterium tuberculosis15 and malaria16 infections, the interactions between cancers and the immune response17, and the impact of drugs on Staphylococcus aureus infections18. We discuss a few of these studies in more detail below.

Fig. 3: A simple model for extracellular bacterial infections.
figure 3

a | Diagram for the simple bacterial infection model. The included compartments, whose numbers are tracked over time, are bacteria, B, and the immune response, I. The following processes are implemented: Bacteria grow at a maximum rate g, and growth slows down to zero as they approach the value Bmax. The bacteria also die at some fixed rate dB and are additionally cleared by the immune response at rate k. The immune response is modelled in a very abstract way with a single equation. It can be interpreted as a specific biological component that is dominant for a given system, or could be considered as the total strength of the response. The immune response has a per-capita growth proportional to the presence of bacteria at rate r, and a decay rate of dI. b | Ordinary differential equations for the simple bacterial infection model. The compartments being tracked are the total number of bacteria and the total strength of the immune response and their changes over time. The right side describes the processes (also called flows) that lead to change. Positive inflows lead to increases in the variable, and negative outflows lead to decreases. Each term on the right side represents a specific biological mechanism — often in an abstract manner. See the model diagram for a description of the different processes. c | Dynamics of the simple bacteria model for two different scenarios. In both scenarios, the initial values for bacteria and immune response are B = 100 and I = 1, and the model is run for 100 days; we assume that the maximum rate of bacteria growth is g = 2 per day (cells divide every 12 hours); the value at which growth will stop is Bmax = 106; and the rate at which the immune response kills bacteria is k = 10–9. The remaining parameters differ between the two scenarios. For scenario 1 (lines B1 and I1), bacteria die at a rate of dB = 1 per day (average lifespan of 1 day), and the immune response decays at a rate of dI = 1 per day and grows at a rate of r = 10–4 per day. For scenario 2 (lines B2 and I2), those values are dB = 0.1, dI = 0.1 and r = 10–6.

Using models for exploration

If one knows enough about a system to postulate specific processes and mechanisms but does not have a good understanding of how the interactions between different processes affect the overall outcomes, building and analysing a model can be a useful approach. Using models in this way provides a good way to gain some intuition of how a system functions and to generate new hypotheses. It is advisable to keep models simple initially and to increase model complexity as your understanding of the system increases.

As an example of this approach, we consider the extracellular bacterial infection model introduced above and explore how a change in the rate at which the immune response increases in response to bacterial load (parameter r of the model) influences the peak bacterial burden (maximum of variable B). To do so, we implement the model on a computer and then simulate it for different values of r, with all other parameters and initial conditions kept fixed. For each simulation, we obtain a time series for bacteria and immune response like the one shown in Fig. 3c. From this time series, we record the peak bacterial load for each value of r. The results are shown in Fig. 4a.

Fig. 4: Different uses of mechanistic models.
figure 4

a | Bacteria peak numbers as a function of immune response activation rate (model parameter r). b | Influenza virus load data and model fits in the absence and presence of neuraminidase inhibitor treatment. The symbols are data from ref.19. The model is the acute virus infection model introduced above (n = dU = 0), with the following changes: to implement mechanism 1, we replace the infection terms bUV and gbUV with b(1 − e1)UV and gb(1 − e1)UV, where e1 describes the strength of the first mechanism. To implement mechanism 2, we replace pI with p(1 − e2)I, with e2 describing the strength of the second mechanism. Solid lines show the best fits of the model with mechanism e1, and the dashed lines show fits of the model with mechanism e2.

Such an analysis allows you to explore how different components of the system interact to influence the outcomes. Because this is such a simple model, you might have expected a decrease in peak bacterial load as immune activation increases, even without performing the simulations. However, it might have been difficult to predict the shape and magnitude of the relation. Even basic intuitions can be harder to form as the systems under study, and the models representing them, become more complex.

Using models to fit data

Although models should be built on the basis of the best biological information available, once a model is built and parameter values are determined, it can be analysed without the need for data. To assess the quality of the model, one needs to compare its results with known biological data. This can initially happen qualitatively, which is a common approach during the exploratory stage.

Going beyond qualitative comparisons requires fitting models to data, and thus performing rigorous statistical inference. All the statistical machinery available for phenomenological models can be used to fit mechanistic models. The difference between fitting phenomenological and mechanistic models to data is that the latter allow for more direct testing and possibly for the rejection of specific postulated mechanisms. This provides a potentially deeper understanding of the system than would be possible with phenomenological models alone.

To demonstrate fitting, we consider viral load data from groups of individuals infected with influenza who receive neuraminidase inhibitors early, late or never (symbols in Fig. 4b, for which data were extracted from ref.19). Assume that you want to investigate potential mechanisms of drug action and postulate the following two hypothetical mechanisms: one, the drug prevents virus entry and new infection of cells; two, the drug reduces the rate at which infected cells produce new virions. To investigate these two mechanisms, you can build two alternative models by incorporating two parameters into the model described above for viral replication. Those parameters, e1 and e2, correspond to the drug’s mechanism of action, represented by hypotheses 1 and 2, respectively (see the Fig. 4b caption for details).

Instead of fixing the model parameter values — as is done during model exploration — (some of) the parameters are allowed to vary and are determined by the fitting routine. By fitting a model with parameter e1 present and another with parameter e2 present, you can test which mechanism (as implemented in your model) describes the data better. Of course, it could be that the data are best described with both mechanisms e1 and e2 acting, as they are not mutually exclusive, or that even with both mechanisms present, the model fails to properly describe the data. For simplicity, we do not test those model variants here.

Figure 4b shows the best fit of the model for either mechanism 1 or 2. The two versions of the model are fit to each virus load time series, with either e1 or e2 turned on at the indicated times (29 hours post-infection for early treatment, 50 hours post-infection for late treatment). The figure shows that models with either mechanism present come reasonably close to the data. You can discriminate between the model fits with different statistical approaches. A frequently used measure is Akaike’s information criterion (AIC), which tries to quantify the quality of a model fit, with lower values indicating a better-fitting model among a candidate set of models fit to data20. Computing the AICs corrected (AICc) for small sample size for the two models gives AICc1 = −56 and AICc2 = −82. Thus, on the basis of AIC, the model fitting suggests that mechanism e2 — that is, drug-induced reduction of virus production by infected cells — fits the data better. It is important to note that when doing model comparisons, the (statistically) ‘best’ model is not necessarily a ‘good’ model. Determination of the overall quality of the model cannot be done purely on statistical grounds, but requires a scientific, not a purely statistical, judgement call to decide whether a model can be considered a reasonable approximation of the underlying system.

In addition to discriminating between different models, and thus mechanisms, fitting provides estimates for the model parameters. In contrast to most parameters in phenomenological models (for example, regression coefficients), the parameters in mechanistic models often have direct biological meaning. Here, you find that for the more likely mechanism (mechanism 2), the value measuring the strength of the drug is e2 = 0.98, suggesting that the drug is highly effective and reduces virus production by 98%. Of course, an important caveat for the interpretation of the estimated parameters is that the model needs to provide a reasonable approximation of the real system.

Despite rapid improvements in the capability and user-friendliness of software, fitting mechanistic models to data can still be technically challenging. It also requires a good match between available data, the model and the scientific question. On the plus side, a fitting approach allows for direct testing of different hypotheses, formulated as different model mechanisms or model variants, and provides estimates for potentially important biological quantities.

Using models to make predictions

Through some combination of the model use approaches just described, you might be able to understand a system well enough that you can build a model that provides a fairly accurate approximation of the real system. You can then use the model to perform in silico experiments: you can make predictions about what might happen to the system if some components were altered, such as through the introduction of a drug. Using models for prediction or forecasting follows essentially the same approach as exploratory model use. The difference is that predictive modelling requires confidence that the model can decently approximate the real system.

Assume that the simple bacteria model accurately captures the dynamics of some real system of interest. In that case, the result shown in Fig. 4a could be interpreted as making predictions of how a change in immune activation rate (possibly mediated by some drug) influences the peak bacterial burden.

Often, if models are used for predictions, it is useful to provide estimates of uncertainty in the predictions. A common approach for obtaining such estimates is through an uncertainty and sensitivity analysis21,22. For ODE models like the ones described here, such an analysis involves varying the model parameters in ranges that are considered biologically reasonable. For each set of model parameters, you run the model and compute the quantities of interest. This provides a set of model predictions, one for each set of model parameters. This distribution of model results provides some measure of uncertainty in the model predictions, due to uncertainty in the underlying model parameters.

Compared to real experiments, these in silico approaches are much faster and cheaper, and generally they have no ethical implications. The major caveat with predictions obtained from such models is that they are only reliable insofar as the model properly captures the important features of the real system. Thus, an iterative process is usually employed, of model predictions, comparisons to data and further exploration and refinement of the models. This can lead to increasingly better and more predictive models. Weather forecasting is a domain where this approach has proven to be very successful.

Model use in practice

Although it is possible to use a model in only one of the ways just described, iterative use as illustrated in Fig. 1 is common. Typically, one or several simple models are initially built to explore the dynamics of the system of interest and are qualitatively compared to what is known about the biological system. If no suitable data for fitting are available, the model can be used to generate hypotheses and make predictions, which then should be tested by comparing to data, either qualitatively or through statistically rigorous fitting. If suitable data are available, the exploration stage is often followed by fitting the most promising candidate model(s) to the data to obtain statistical support for specific models, as well as estimates for the model parameters. These statistically supported models can then be used to make predictions about as-yet-unobserved behaviour of the system (for example, simulating the removal of a cytokine in the model). Predictions should then be tested with further data, likely leading to further model refinements.

A few real-world examples

Mechanistic simulation models of the type we just described are increasingly used in immunological and infectious disease research. The literature is too vast to fully review it. We therefore provide a review and brief summary of a few prominent examples and pointers towards further discussions of such models.

Nowak and colleagues used a simple model similar to the viral infection model described above to gain general insights into HIV infection dynamics23. A finding from their analysis was the suggestion that viral sequence diversity is positively correlated with virus load. In another study, model fitting was used to allow the authors to estimate the rates and total amount of HIV virus production, as well as CD4+ T cell numbers and virus half-lives24. These findings helped confirm the futility of single-drug treatment. Another study considered the impact of interferon (IFN) for HCV-infected patients; by fitting a simple model, the researchers determined that IFN’s main mode of action is to block virion production25. That study also provided quantitative estimates for the efficacy of IFN treatment as well as virus half-life. For more examples and further details on such models applied to HIV and HCV, see, for example, refs7,8.

The same types of viral infection models have been used to study influenza. In ref.26 the authors used a combination of models and data to show that the fitness of neuraminidase-resistant H1N1 2009 pandemic influenza strains was similar to that of drug-susceptible virus strains. Such models helped shed light on the dynamics of co-infection with influenza virus and Streptococcus pneumoniae. Analysis of a co-infection model suggested that around four to six days after influenza virus infection, secondary bacterial infection can occur at a much lower exposure dose27. Another study28 discriminated between different mechanisms of pathogen interaction by fitting a model to data and found that increased virus release was likely in the presence of bacteria. Further examples and details of influenza models can be found in refs9,10,11,12,13.

Models like the bacteria model discussed above have been used to study malaria and tuberculosis infections. In one such study29, the authors used a simple discrete-time model, fitted to data, to elucidate the relative roles of target-cell limitation versus immune responses during malaria infections. A four-equation differential equation model30 allowed the prediction of how changes in asexual parasite densities influence gametocyte conversion rates. In a study of tuberculosis31, the authors used a detailed model to explore and predict the impact of depleting key cytokines on the infection dynamics. They found, for instance, that depletion of IL-10 and IL-4 during latency led to a large increase in bacterial density. Further examples of simulation models applied to malaria and tuberculosis can be found in refs32,33.

Models are also often used to study the effects of antimicrobial drugs. This approach is generally referred to as pharmacokinetic–pharmacodynamic (PK–PD) modelling34. While most PK–PD models include equations for the processes describing the pathogen and the drug dynamics, only a few also model components of the immune response. In an example of a model that includes PK–PD and the immune response35, use of a model suggested that high-dose, extended treatment with antibiotics is often the best strategy for reducing resistance emergence. For additional examples of models that include components of the immune response, see refs36,37,38.

Another area in which such models have been used is in probing the dynamics of T cells. As an example, stochastic simulation models were used in ref.39 to determine that random differentiation and division events drive CD8+ T cell diversification. Application of another model helped characterize divergent subpopulations of CD4+ effector and central memory T cells40. refs41,42 provide further examples.

These types of models have also been successfully applied to the study of non-infectious systems. A compartmental simulation model applied to chronic myeloid leukaemia showed that the drug imatinib inhibits the production of new leukaemic cells but does not deplete existing cells43. In ref.44, the authors combined models and data to determine the existence of distinct subpopulations of haematopoietic stem cells with different turnover rates.

These examples are just a few among many. For further examples of such models applied to specific systems or questions, see, for example, the recent collections of articles introduced in refs45,46.

How to apply models

Reading thus far might have persuaded you that the kinds of models we describe could be useful for your research. Here are some suggestions for the next steps.

Form a team

We described what simulation models can and cannot do. If you have a question that lends itself to this kind of modelling, arguably the best option is to team up with a modelling expert. The number of scientists using mechanistic simulation modelling approaches has been increasing considerably over the past decades. These individuals are distinct from biostatisticians and bioinformaticians, although there is often considerable overlap. Modellers are often ready to apply their skills and tools to interesting immunological questions. To make this team approach successful, each collaborator needs to understand enough about the other person’s domain to engage in a meaningful manner. Thus, modellers need to understand enough biology and immunology to build reasonable models, and immunologists need to understand enough about the models to know the models’ strengths and limitations and to assess their usefulness for a given situation. We hope this article helps with the latter aspect.

Build your own model

Some readers might want to try building and analysing models themselves. Before doing so, consider whether a mechanistic model is the right tool to address your question. At times, a question may best be addressed by experiments and collecting more data. At other times, a phenomenological model might be the right approach. If a simulation model is suitable for your question, determine what type of mechanistic model you need. Compartmental models implemented as ODEs (the models we have focused on in this review) are often a good first choice. However, for certain questions and scenarios, those model types are not suitable, and you might need a different type of model. See Box 2 for a brief discussion.

Next, you need to decide how much detail to include. We recommend starting simple and increasing complexity as needed (Box 3). As you build your model, be clear about the assumptions you make, and ensure that your assumptions can be justified on the basis of what is known about the biology of the system. If several potential processes may be reasonably assumed, it might be suitable to explore multiple models, each encoding one or some of the biologically reasonable mechanisms (see, for instance, the two drug mechanism models described above).

A few specific pointers regarding practical steps towards implementing the models are given in Box 4. Once you have one or several starter models built, you can explore their behaviour, use them to generate hypotheses and predictions, or fit them to available data for hypothesis testing. During this process, you will likely further refine and improve your model.

While coding is generally required, there are ways to build models that do not require writing computer code. Some software, such as Berkeley Madonna, Stella or more specialized tools47, allows you to graphically build and run models. However, be prepared for the likelihood that at some point you will need to engage in some level of code writing. Before you embark on learning a specific programming language, it is worth considering which one to learn and use. Currently, two of the most popular general-purpose languages for scientific computing are R and Python. Both languages are free and highly flexible, and both have large user and developer communities. Commercial products such as MATLAB or Mathematica are also frequently used.

One of the authors has developed a free software package called Dynamical Systems Approaches to Immune Response Modelling (DSAIRM)48. DSAIRM is implemented as an R package. The main goal of DSAIRM is to provide a user-friendly tool to learn about modelling in immunology, without the need to write code. It also provides access to the code for all the models implemented in DSAIRM, which you can then modify for your specific research question. Further details can be found on the package website48 and in ref.49.

Next steps

To learn more, several books8,50,51,52 and review articles7,41,46 provide further details on mechanistic simulation modelling. Beyond additional reading, a great way to learn the material is by actively engaging with it. The above-mentioned DSAIRM R package is meant for that purpose. It is quick and easy to install, and you can use it to explore and learn a range of models and concepts related to infection and immunology modelling using a graphical interface.

Conclusion

The type of mechanistic modelling discussed here is used increasingly in biology, and specifically in immunology, microbiology and related areas. The adoption and progress of modelling have been rapid, driven by data of higher quantity and quality, better and easier-to-use computational tools, and a general drive in immunology towards becoming an increasingly rigorous, quantitative discipline. Together with other quantitative analysis approaches, mechanistic simulation models provide a useful set of tools that allow one to investigate mechanisms of interaction and the resulting dynamics for a specific system.