Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include interactions between HIV, TB and NCDs #1293

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions docs/ibm_course.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. _ibm_course:

===========================================
Building and Understanding Individual Based Models to Inform Health Policy
===========================================

Welcome to this tutorial to help you self-learn how to build individual-based models to inform health policy. This is intended to be an accessible introduction which requires no existing knowledge.

What is an Individual-based Model?
====================================

Each time the model program is run it generates values of variables that represent the characteristics of individuals and simulates how these change over time. By building a model that accurately reflects real changes in people over time, we can evaluate the potential effects of a policy of introducing a health intervention.

`Here <https://mediacentral.ucl.ac.uk/Player/5G0ag7CC>`_ is a video describing individual-based models to inform health care policy:

(You don’t need to have watched this video to get started on the tutorial!)

Get started
====================================
We will use a programming language called Python. We will use Google Colaboratory (“Colab”) which is a website which makes it easy to get started.

The links to click for all the content are below.

You may want to watch `this very brief video <https://youtu.be/VPl2emXVJ1M>`_ that shows you what to expect when you click on the first link.


Building an individual-based model
====================================

* Part 1: Introduction to Colab, time steps, variables, print function, range function, "for" loops. [`Start <https://colab.research.google.com/drive/1QF_aUgIkM-H1JXJRBb9DSONohC2WEvbH?usp=sharing>`_]

* Part 2: Python dictionaries, accessing and updating dictionaries [`Start <https://colab.research.google.com/drive/1VVSDFXGtIgJEqEgp1rqltUfluhuhdYW9?usp=sharing>`_]

* Part 3: Time step loop, population loop, combining loops and using dictionaries [`Start <https://colab.research.google.com/drive/1TSGba5w_nuRXd7QAYWWPT2tMVccaqc8I?usp=sharing>`_]

* Part 4: Generating random numbers/ages, round function, "if" statements, updating variable values, the first time step, all other time steps [`Start <https://colab.research.google.com/drive/1wq0BeCgVVWPj_SIFzsTyjA_KKzAUtDZb?usp=sharing>`_]

* Part 5: Random choice method, pandas and using tables, using probabilities, "else" statements [`Start <https://colab.research.google.com/drive/1G-GHM-A6Z1dk0YBGI8cqX6EekJ5i-hrR?usp=sharing>`_]

* Part 6: Adding body mass index (BMI), "elif" statements, creating and calling a function, docstrings [`Start <https://colab.research.google.com/drive/1gBYGIQK42XN2ovG-EFA7LQW_2dO_GC7f?usp=sharing>`_]

* Part 7: Refactoring updating rules into functions [`Start <https://colab.research.google.com/drive/1FVKyP-51IjwW4A6CAmufuZGXx7e0sG0_?usp=sharing>`_]

* Part 8: Visualizing changes in variable distribution over time, matplotlib and pyplot, values method [`Start <https://colab.research.google.com/drive/1_ZmPJPcsy6soCnDJSU7SeTElAJb7-rna?usp=sharing>`_]

* Part 9: Adding blood pressure, ordering and data selection, append method [`Start <https://colab.research.google.com/drive/1PjHptwX-SkJepsFeqEhrDr738V2euRiO?usp=sharing>`_]

* Part 10: Adding mortality, age-specific death rate, booleans, integrating deaths into the model [`Start <https://colab.research.google.com/drive/1fb8XkWEsCi-BVkzUtQKwYrrUej-aqCCg?usp=sharing>`_]

* Part 11: CVD death risk, the math.exp method, adding cause of death, "None" keyword [`Start <https://colab.research.google.com/drive/1T7QWmeDBux6Y2N-OR3Pt80qJoAlPBcfB?usp=sharing>`_]

* Part 12: Life years (person-years at risk), CVD death rate, simulating health policy intervention [`Start <https://colab.research.google.com/drive/1lsSSGO07vefkhjp5mF2BodRB2OhgtyAv?usp=sharing>`_]

* Part 13: Adding time of death, running model with intervention, comparing results between groups [`Start <https://colab.research.google.com/drive/1_T14-Dv3G_oTMpRRIdu1VpXrPG0mHaci?usp=sharing>`_]


Building a transmission model
====================================
* Part 14: Introduction and breakdown of new model structure [`Start <https://colab.research.google.com/drive/1Yhf-aL4Qe8A3FsftrcSsoErFWRNvjwLf?usp=sharing>`_]

* Part 15: Exercise: Adding vaccination variable to the new model [`Start <https://colab.research.google.com/drive/1-wHtdpFJu_wiDQvFz2Q4aAbtS-UsZcU4?usp=sharing>`_]

* Part 16: Adding interactions to the model, the random sample method [`Start <https://colab.research.google.com/drive/1HmukuID6MLxrEhc5xQRV74-cwdhrFnND?usp=sharing>`_]

* Part 17: Adding infection variables to the model (Section 1) [`Start <https://colab.research.google.com/drive/16I36MtjT9oho7IzlNqaT9AwHtIoDD2vw?usp=sharing>`_]

* Part 18: Adding infection variables to the model (Section 2) [`Start <https://colab.research.google.com/drive/1lo06dzQ-z6D13E64MfMLdAHcA_YCUDD_?usp=sharing>`_]

* Part 19: Finalizing our basic transmission model [`Start <https://colab.research.google.com/drive/1K4ZpgSkG3TAPft3ek_OTwZgVrMFSXwTq?usp=sharing>`_]



Acknowledgments
====================================
This content was created by George Phillips, `Loveleen Bansi-Matharu <https://profiles.ucl.ac.uk/1985-loveleen-bansi-matharu>`_ and `Andrew Phillips <https://profiles.ucl.ac.uk/5430>`_.

Suggested Citation
====================================
Phillips G, Bansi-Matharu, Phillips AN. (2024) Building and Understanding Individual Based Models to Inform Health Policy. Available on www.tlomodel.org


9 changes: 8 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ It is developed in a collaboration between:
It benefits from a close partnership between this team and the Ministry of Health, Malawi.


Latest Release
==============
The latest release of our code is available `here <https://zenodo.org/records/10144016>`_ and citable as:

**The Thanzi La Onse Model. v0.1, Zenodo, 16 Nov. 2023, doi:10.5281/zenodo.10144016.**


Open Source Code Repository
=================
Our code base is open source and available for review and usage at `<https://github.com/UCL/TLOmodel>`_
Expand All @@ -45,7 +52,7 @@ Contents
azure_batch
reference/index
resources/index
background
learning
publications
contributors
contributing
7 changes: 6 additions & 1 deletion docs/background.rst → docs/learning.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
=================
Background
Learning Resources
=================

We provide here resources that provide a background to the type of modelling and health-economics work we are undertaken.



Online Course in Individual-Based Modelling
===========================================
:ref:`ibm_course`

Health-Economics
================

Expand Down
2 changes: 1 addition & 1 deletion docs/writeups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Representation of the Healthcare System

Contraception, Maternal and Newborn Health
===================================
* **Contraception**: Determines fecundity, the usage of contraception (including switching between contraceptives) and the onset of pregnancy. :download:`.docx <./write-ups/Contraception.docx>`
* **Contraception**: Determines fecundity, the usage of contraception (including switching between contraceptives) and the onset of pregnancy. :download:`.docx <./write-ups/Contraception.docx>` `Journal article (Studies in Family Planning) <https://onlinelibrary.wiley.com/doi/10.1111/sifp.12255>`

* **Maternal and Newborn Health** Represents the antenatal period of pregnancy (the period from conception to the termination of pregnancy), labour, birth, the postnatal period, associated complications and healthcare delivered through routine and emergency maternity services. :download:`.pdf <./write-ups/MaternalNewbornHealth.pdf>`

Expand Down
4 changes: 2 additions & 2 deletions src/tlo/methods/healthsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ class HealthSystem(Module):
' to the module initialiser.'),

'policy_name': Parameter(
Types.STRING, "Name of priority policy assumed to have been adopted until policy switch"),
Types.STRING, "Name of priority policy adopted"),
'year_mode_switch': Parameter(
Types.INT, "Year in which mode switch in enforced"),

Expand Down Expand Up @@ -625,7 +625,7 @@ def __init__(
and priority
:param ignore_priority: If ``True`` do not use the priority information in HSI
event to schedule
:param policy_name: Name of priority policy that will be adopted if any
:param policy_name: Name of priority policy adopted
:param capabilities_coefficient: Multiplier for the capabilities of health
officers, if ``None`` set to ratio of initial population to estimated 2010
population.
Expand Down
Loading