This repository contains code and data to reproduce the results of the paper "Comparative Evaluation of Behavioral Epidemic Models Using COVID-19 Data" by Gozzi et al, 2025.
The data used in the paper is available in the data folder. In particular, the data folder contains 9 subfolders, each containing the data for a different region considered in the paper (Bogotá, Chicago, Gauteng, Jakarta, London, Madrid, New York, Rio de Janeiro, and Santiago de Chile). Each subfolder contains the following folders/files:
contact_matrix: contains acontact_matrix.npzfile, which contains the contact matrix for the region. Contact matrices are obtained from Mistry et al, 2021.epi_data: contains aepi_data.csvfile, which contains the epidemiological data for the region, with daily new cases and deaths.google-mobility-report: contains agoogle_mobility_data.csvfile, which contains the Google mobility data for the region, from the Google Mobility Report.population-data: contains apop_data_Nk.csvfile, which contains the population in different age groups (0-9,10-19,20-24,25-29,30-39,40-49,50-59,60-69,70-79,80+) for the region.hemisphere: contains ahemisphere.csvfile, which contains the hemisphere of the region (needed for seasonal forcing).
The source of the data is the following:
The code used to reproduce the results is available in the models folder. In particular, the models folder contains a file for each of the three behavioral epidemic models considered in the paper:
mobility_model_age.py: contains the code for the Data-Driven Behavioral (DDB) Model.compartment_model_age_deaths.py: contains the code for the Compartmental Behavioral Feedback (CBF) Model.function_model_age_deaths.py: contains the code for the Effective Force of Infection Behavioral Feedback (EFB) Model.
Additionally, the file utils.py contains the functions used to calibrate the models via Approximate Bayesian Computation (ABC), while the file constants.py contains the values of the fixed parameters used in the models.
We provide an example of how to run the models in the example.ipynb notebook.
To reference our work, please use the following citation:
@article{
doi:10.1073/pnas.2421993122,
author = {Nicolò Gozzi and Nicola Perra and Alessandro Vespignani },
title = {Comparative evaluation of behavioral epidemic models using COVID-19 data},
journal = {Proceedings of the National Academy of Sciences},
volume = {122},
number = {24},
pages = {e2421993122},
year = {2025},
doi = {10.1073/pnas.2421993122},
URL = {https://www.pnas.org/doi/abs/10.1073/pnas.2421993122},
eprint = {https://www.pnas.org/doi/pdf/10.1073/pnas.2421993122}
}