Dynamical Systems Approach to Immune Response Modeling


DSAIRM is an R package containing a set of simulation modelss (apps) that teach within-host infection dynamics and immune response modeling from a dynamical system perspective.

You can explore the apps through a graphical user interface, implemented in Shiny. By going through the documentation and instructions of each app, you will learn important concepts of within-host and immune response modeling. You will also learn how simulation model can be used to study such concepts.

You can also directly access and modify all simulations to adapt them to your research needs.

Getting Started

The best approach to use this package is to install it, load it, and start the main menu, then you are ready to go. These lines of code typed into the R console will get you there:


You can also give the package a quick try online, without having to install it. I still recommend you install it like any regular R package should you decide that you want to use it. Note that I only have a free plan for shinyapps.io, where the online version is hosted. If the link fails to work it likely means I reached my maximum monthly allowed capacity. In that case, just go ahead and install the package. It’s only 3 commands!

For a quick introduction to the package, step-by-step instructions on getting started, and more information on the different ways you can use the package see the tutorial (vignette).

Further information

  • A ‘companion’ package to this one, called Dynamical Systems Approaches for Infectious Disease Epidemiology (DSAIDE), focuses on models for infectious disease epidemiology (the population level). It has the same structure as DSAIRM. See the DSAIDE site for more information.
  • I have solutions (in progress) to most of the ‘What to do’ tasks for the different apps. If you are an instructor using this package as part of a class, email me if you are interested in having access to these solutions.


This R package is developed and maintained by Andreas Handel. A full list of contributors can be found here. The development of this package was partially supported by NIH grant U19AI117891.