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 agent-based model, 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.
A good book on general complexity is Think Complexity, which introduces some of the key concepts you may need to think about when developing an agent-based model.
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 agent-based models. Even if you are not planning on becoming a modeller, it is important to understand the roles agent-based models have when studying or working within complex social systems. Understanding what an agent-based model is, why you use agent-based models rather than alternative approaches, and how agent-based models 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 agent-based model. A good place to start is with the agent-based programmable modelling environment Netlogo . Netlogo is the most widely used agent-based model 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 website 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 agent-based models and also an online course covering the Fundamentals of Netlogo. For a detailed tutorial that supports you to create an agent-based model from scratch in NetLogo, we recommend J Badham's tutorial Agent-Based Modelling for the Self Learner.
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 agent-based models 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.
Agent-based modeling in public health: current applications and future directions. Tracy et al.
If you are familiar with modelling and software development, but are new to agent-based modelling, it is good to see how agent-based models 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 agent-based models from a urban health point of view is Brief 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 agent-based model, and then uses this model to demonstrate the process of using an agent-based model in an experimental process by exploring inequalities in diet in the context of urban residential segregation.
Another good reference paper is Different Modelling Purposes by Edmonds et al.
Once you have identified the questions that an agent-based model can help you with, you need to choose what type of agent-based model will best suit your research area. Agent-based models can be applied to a wide range of social science research areas, with each area requiring a different agent-based modelling 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).
A very good text with many worked examples is Agent-Based Modelling for Archaeology from the Santa Fe Institute. The agent-based modelling 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.
Agent-based models have been used 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 agent-based modelling methods are:
- Agent-based and individual-based modelling by Railsback and Grimm. This is one of the most well-known textbooks for ecological agent-based models. 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 agent-based model design and documentation protocols applied to some published models in an attempt to standardise methodologies across projects and disciplines.
- Design of agent-based models by Tomas Salamon. This book also covers formal agent-based model 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 agent-based modelling 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 agent-based modelling methods and is possibly a better starting point for new modellers.
All modelling should be a collaborative effort with a range of stakeholders. Agent-based models have elements that make interacting with the model and incorporating feedback from users more immediate, thus facilitating collaboration with stakeholders. Although agent-based models 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. This blog piece by Jen Badham provides some insights into the sorts of questions to ask when starting a modelling process with stakeholders, and this paper by D’Aquino et al. provides a good example of participatory modelling in practice.
A similar approach, with a bespoke python agent-based model, 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.
Agent-based models have unique requirements for the interpretation of their outputs. Agent-based models can be seen as in-silico experiments where the system under investigation is recreated as a “ digital twin". With an agent-based model you are attempting to mirror a real-world system within the computer code. This tight affinity between the model and the real system also extends to the nature of the experiments and the type and methodology of data capture. With agent-based models 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 experiments or surveys on you real target system.
The “virtual-experiment” nature of an agent-based model means that you must play with and experiment with your model to fully understand how it works. Only then can you run your real experiments. A good explanation of this unique aspect of agent-based models and how to understand your agent-based model 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 use of the Netlogo behaviour space tool and how to integrate your data capture with other analysis software including Excel, Python and R.
For those of you coming to social science agent-based models 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 how to use R to analyse agent-based model 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 agent-based models. For a more in-depth tutorial on using R we recommend Wickham's R for Data Science.
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 agent-based models. The complex nature of agent-based models 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 agent-based model, 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 agent-based model and get the most from it. For a more in-depth explanation of experimental design see Loscheid et al. Opening the ‘black box’ of simulations.
There are several associations for agent-based modellers across social science disciplines. The European Social Simulation Association (ESSA) has three major events each year: the major conference, an informal online festival, and a summer school. There are also specific initiatives to support newer modellers such as ESSA@Work and Open Labs. The Computational Social Science Society of the Americas (CSSSA) has a broader disciplinary base, covering not just social simulation but also social network analysis. CSSSA has an annual conference and a regular webinar series. The Pan-Asian Association for Agent-based Approach in Social Systems Sciences is less active overall but coordinates with the other two regional organisations for the World Social Simulation conference.
Less formal news and occasional support or discussion is available through the SIMSOC mailing list and the Computational Social Science Facebook group. There are also resources and groups organised around the specific software. The NetLogo resources page includes a link to the NetLogo users group and a range of tutorials and other useful materials.
ABM Coding Group: Modelling Public Health Challenges
Monthly meeting, last Tuesday of the month, 11 am-12 noon
We’ve heard from several researchers who have gathered the information they need to inform the design of their ABM, but are having difficulty turning their theory into model code. If you are looking for support with coding come and join one of our ABM coding group meetings.
Who: The group is open to anyone who would like support in programming an ABM that address a public health challenge. This includes early-career researchers (ECRs) as well as more experienced researchers or programmers who may be new to this field.
When: Meetings will be hosted on the last Tuesday of every month at 11am (BST); see registration link for specific dates.
Where: Meetings will be hosted online via Zoom.
These informal coding group meetings will be hosted by Dr Ricardo Colasanti, an experienced programmer, with expertise in range of programming languages, including NetLogo, Python and Java.
Meetings will include a mix of discussion, worked examples and presentations, as well as the opportunity to address specific topics or questions brought up by members of the group each month. We welcome topic suggestions from any group members, so please email firstname.lastname@example.org if there are coding topics or questions you would like the group to discuss.
This is an informal coding support group, providing an opportunity to meet other researchers working in the field, discuss challenges and share your experiences (good and bad!) of your journey as an ABM programmer.
Please click here to register and get meeting login details.
If you are unable to attend the meeting, but would like programming advice on your public health agent-based modelling project, you can also get in touch with Ric with specific questions by emailing email@example.com.