Training

Self-learner curriculum for agent based models in population health

This online resource serves as a self-learner’s curriculum to provide a broad direction to guide independent learning and study for those wanting to find out more about using agent-based models (ABMs) in population health. The following sections provide information on existing resources, organisations, sources of knowledge, and people within PHASE and the wider simulation community that will help you to use ABMs for health improvement.


The curriculum is structured to suit a range of audiences: 

  • People who want to learn about health improvement modelling  
  • People who want to learn how to become “modellers” and build agent-based simulation models themselves  
  • People who want to become “model users” and work with modellers to make decisions on how the models are used in public health practice, even if they don’t learn to build models themselves 

To understand why you would use an ABM, a key starting point is to understand complex systems. Complex systems are made up of many different components that interact with each other. Many of our common-sense intuitions and expectations turn out to be wrong when we consider complexity. Traditional theories and methods for understanding the causes of health behaviours and outcomes can face difficulties when there are complexities around them.

 

One of the key aspects of complexity is the interactions between components of the system. Good places to start learning about complexity include the Santa Fe Institute's Complexity Explorer Introduction to Complexity.  This 10 module course provides an overview of the key conceptual and mathematical features of complexity, including cellular automata (units used in a model of computation) that have an important methodological link to Agent Based Modelling. This course does not talk about health in detail and includes a lot of information related to other disciplines like physics and computer science.

Once you have a good understanding of complexity and how it affects the way we study social systems such as population health, the next step is to learn about the principles of ABMs. Even if you are not planning on becoming a modeller, it is important to understand the roles ABMs have when studying or working within complex social systems. Understanding what an ABM is, why you use ABMs rather than alternative approaches, and how ABMs are used in research and health improvement are important things for modellers and model users to know.

 

The next step is to create your own ABM. A good place to start is with the agent-based programmable modelling environment Netlogo . Netlogo is the most widely used ABM construction platform. It is used at all levels of modelling and is the platform used in many highly cited papers.

Because NetLogo is so widely used there are many online resources to help you start coding. The Netlogo site has excellent starting tutorials which we would recommend you start with.

 

Our recommendation for your next step would be to the Sante Fe Institute website.

Complexity Explorer by the Sante Fe Institute has a good online Introduction to agent-based modelling course that covers the fundamentals of ABMs and also an online course covering the Fundamentals of Netlogo.

 

A more social science focused course is available from the National Centre for Research Methods called Agent-based modelling for social research.

 

You can read more about ABMs for health and social sciences in these papers:

Developing agent-based models of complex health behaviour. Badham et al.

Social network analysis and agent-based modeling in social epidemiology. El-Sayed et al.

A narrative review of the use of agent-based modeling in health behavior and behavior intervention. Yang et. al. 

The model thinkerIf you are familiar with modelling and software development, but are new to ABM, it is good to see how ABMs compare with other modelling methodologies. A very good text for this is  Scott E. Page’s book The Model Thinker. This book comprises 29 chapters, each outlining and comparing  separate modelling methodologies from a social science perspective.  It encourages a multiple modelling approach to answering your research questions. The text highlights how differing modelling methodologies bring a different and informative viewpoint to your research question. Page reworks George Box’s famous commentary on modelling to: “All models are wrong, but many models are useful”.  The chapters on cellular automata, agent-based and network models are good introductions to  complex systems science applied to the social sciences. There is also a free online course hosted by Coursera on which the book is based.

 

A useful paper from 2015 that describes the process required for building ABMs from a urban health point of view isBrief introductory guide to agent-based modeling and an illustration from urban health research by Auchincloss and Garcia. The paper gives an introductory guide to creating a simple ABM, and then uses this model to demonstrate the process of using an ABM in an experimental process by exploring inequalities in diet in the context of urban residential segregation.

Once you have identified the questions that an ABM can help you with, you need to choose what type of ABM will best suit your research area. ABM can be applied to a wide range of social science research areas, with each area requiring a different ABM approach. The different approaches are centred around different types of agents (e.g., individuals or groups) and the way they interact with one another (e.g., spatially or in a network) and with their environment (e.g., within discrete areas, as continuous space, or no space at all).

 

ABM for archaeologyA very good text with many worked examples is Agent-Based Modelling for Archaeology from the Santa Fe Institute. The ABM approaches applied to archaeology are very similar to those that can be applied to the social sciences and health. For example, foraging is a good example that can be applied to healthy shopping. The book (also available as a free pdf download) is based around NetLogo modelling software and also serves as an advanced tutorial on NetLogo, as it covers a number of areas not normally addressed in other NetLogo tutorials. 

ABM have been used in across a range of disciplines and have similar modelling methods whether they are focussed on physical, biological or sociological questions. Two texts that provide an in-depth understanding of ABM modelling methods are:

 

  • Railsback_ABM Practical IntroductionAgent-based and individual based modelling by Railsback and Grimm. This is one of the most well-known textbooks for ecological ABMs. Like Agent-based modelling for Archaeology, this book is based on NetLogo and also serves as an excellent NetLogo tutorial. It also introduces the topics of Pattern Oriented Modelling (POM) and Overview Design and Details (OOD). These are formal ABM design and documentation protocols applied to some published ABMs in an attempt to standardise methodologies across projects and disciplines.

 

  • Design of ABMDesign of agent-based models by Tomas Salamon. This book also covers formal ABM design. It describes the Agentology methodology, which is a set of guidelines for identifying agent-like objects in your system of interest and then describing how to create an agent type from them. The examples in the text are not based on any specific modelling software.

Both of these books are essential for any large-scale ABM project whether or not you decide to implement their formal “meta” methodology.

 

 A less formal, but nonetheless useful methodology is the  “The Eightfold Way”. This is described in Complex adaptive systems: an introduction to computational models of social life by Miller and Page. This is more of a suggested approach to applying ABM methods and is possibly a better starting point for new modellers.

Agent-based spatial simulationAll modelling should be a collaborative effort with a range of stakeholders. ABMs have elements that make interacting with the model and incorporating feedback from users more immediate, thus facilitating collaboration with stakeholders. Although ABMs have advantages in user engagement and iterative modelling compared with other modelling methods, the process has to be done correctly. A good text is “How to Involve Stakeholders in the Modeling Process” in Agent-Based Spatial Simulation with NetLogo Volume 1 by Banos et al.  This topic is also covered in both Agent-based and individual based modelling: a practical introduction and Design of agent-based models.

 

The 2019 paper by Volnov et al. Tools and methods in participatory modeling: Selecting the right tool for the job gives an overview of  current methods in participatory modelling. It presents a systematic overview of the methods available to assist modelling with stakeholders and offers practical guidelines to improve decisions on method selection at all stages of the participatory modelling process.

 

To facilitate user engagement the use of  NetLogo Web can be useful, as NetLogo Web models can be run in any browser. The model is a complete webpage with the model transcribed into JavaScript. Having a model as a webpage negates the installation of bespoke modelling software on a stakeholder's computer. This is something that can be very problematic especially in healthcare organisations. This makes the model immediately accessible to the stakeholders and can greatly enhance their interaction with the modelling process.

 

A similar approach, with a bespoke python ABM, is to use a hosted Jupyter notebook with Google's  Colab. This also allows complex models to be run in a webpage on a stakeholder’s computer without any additional software.

ABMs have unique requirements for the interpretation of their outputs. ABMs can be seen as in-silico experiments where the system under investigation is recreated as a “ digital twin". With an ABM you are attempting to mirror a real-world system within the computer code. This tight affinity between the ABM and the real system also extends to the nature of the experiments and the type and methodology of data capture. With ABMs you are running virtual experiments rather than running a model. Your experimental design and data capture will be greatly informed by the methodology that you or your team would use in running real life experiment or surveys on you real target system. 

 

ABM for archaeologyThe “virtual-experiment” nature of an ABM means that you must play with and experiment with your ABM to fully understand how it works. Only then can you  run your real experiments. A good explanation of this unique aspects of ABMs and how to understand your ABM can be found in Chapter 9 of
Agent-Based Modelling for Archaeology from the Santa Fe Institute. While this deals with Archaeology models it covers the same areas of experimental design, data capture and analysis you will encounter in models of non-communicable disease prevention. Specifically, what data to collect, how long to run a model, how and when to collect the data, running experiments and how the model behaves in response to changes in the input variables (this is often referred to as behaviour space). The chapter covers using the Netlogo behaviour space tool and how to integrate your data capture with other analysis software including Excel, Python and R.

 

Ruby and RFor those of you coming to social science ABMs from other backgrounds it is worth getting to know how to script in R as this is the main data analysis and visualisation tool used in social science. Exploring Everyday Things with R and Ruby provides an overview of using R to analyses ABM outputs. This book looks at writing very simple models, collecting data from them and then analysing the data statistically and graphically with R (the models are easily recreated with Netlogo). These are the same skill sets you will need for analysing ABMs.

 

Chapter 9 of Agent-Based Modelling for Archaeology also covers sensitivity and uncertainty analysis. As modellers you may be familiar with sensitivity analysis. Uncertainty analysis is arguably the more important with ABMs. The complex nature of ABMs means that there are many model variables and there will be some of those variables that will be difficult to calibrate. Uncertainty analysis will help you identify which of those variables has the most effect on the behaviour of your model.

 

Another useful book chapter on this topic is Chapter 23 of Agent-based and individual based modelling: a practical guide. This extensively covers sensitivity and uncertainty analysis and also introduces robustness analysis. Robustness analysis is when you change the structure of your ABM, usually removing variables or creating a simplified  sub-model, and see the effect it has on your model behaviour.

 

All of the methods outlined here will help you understand your ABM and get the most from it.