This repository contains the code used for the project: Evaluating selection bias in electronic health record data: using agent-based models to examine whether geographic disparities in community-acquired Methicillin-resistant Staphylococcus aureus are due to healthcare-seeking behaviors
This study aimed to explore how healthcare seeking behaviors may generate small-area health inequalities observed in EHR data by modeling an individual’s social and geospatial context. The study's research question is: How might an individual's economic status and geographic location affect healthcare-seeking behaviors and, in turn, geographic disparities in CA-MRSA infections presenting in emergency departments?
We developed an agent-based model (ABM) to simulate the dynamics of healthcare-seeking behaviour for community- acquired Methicillin-resistant Staphylococcus aureus infections among residents in a Northwest subregion of California. The simulation assumed no true difference in infection prevalence across the study area. We modeled the process of choosing whether to seek treatment for an infection and, if so, whether to visit a primary care physician or the emergency department (ED) to see if geographic differences in prevalence would emerge from the ABM when considering only ED data. We compared the spatial patterns of infection prevalence in the ED identified from the ABM to empirical data.
This repository is structured as follows:
- The directory code/ contains all the scripts used to process the data, develop the model and analyze the results:
- I_data-processing.Rmd process the data in the format to be used in the model
- II_ABM-MRSA is the directory for the GAMA project where the model is developed.
- includes contains the data used by the abm model
- model contains the scripts to run the abm model
- Agents.gaml declares the agent behaviors
- Experiment.gaml declares the experiments to run the model
- Global.gaml declares the global behavior used in the model
- Parameters.gaml declares the most relevant parameters in the model
- III_analysis.Rmd process the model outcomes for the analysis performed
- The directory data/ contains all the data used for the model