Contextual factors predicting compliance behavior during the COVID-19 pandemic: a machine learning analysis on survey data from 16 countries

Nandor Hajdu*, Kathleen Schmidt, Gergely Acs, Jan P. Röer, Alberto Mirisola, Isabella Giammusso, Patrícia Arriaga, Rafael Ribeiro, Dmitrii Dubrov, Dmitry Grigoryev, Nwadiogo C. Arinze, Martin Voracek, Stefan Stieger, Matus Adamkovic, Mahmoud Elsherif, Bettina M. J. Kern, Krystian Barzykowski, Ewa Ilczuk, Marcel Martončik, Ivan RopovikSusana Ruiz-Fernandez, Gabriel Baník, José Luis Ulloa, Balazs Aczel, Barnabas Szaszi

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

3 Citations (Scopus)


Voluntary isolation is one of the most effective methods for individuals to help prevent the transmission of diseases such as COVID-19. Understanding why people leave their homes when advised not to do so and identifying what contextual factors predict this non-compliant behavior is essential for policymakers and public health officials. To provide insight on these factors, we collected data from 42,169 individuals across 16 countries. Participants responded to items inquiring about their socio-cultural environment, such as the adherence of fellow citizens, as well as their mental states, such as their level of loneliness and boredom. We trained random forest models to predict whether someone had left their home during a one week period during which they were asked to voluntarily isolate themselves. The analyses indicated that overall, an increase in the feeling of being caged leads to an increased probability of leaving home. In addition, an increased feeling of responsibility and an increased fear of getting infected decreased the probability of leaving home. The models predicted compliance behavior with between 54% and 91% accuracy within each country’s sample. In addition, we modeled factors leading to risky behavior in the pandemic context. We observed an increased probability of visiting risky places as both the anticipated number of people and the importance of the activity increased. Conversely, the probability of visiting risky places increased as the perceived putative effectiveness of social distancing decreased. The variance explained in our models predicting risk ranged from < .01 to .54 by country. Together, our findings can inform behavioral interventions to increase adherence to lockdown recommendations in pandemic conditions.

Original languageEnglish
Article numbere0276970
Number of pages15
JournalPLoS one
Issue number11
Publication statusPublished - 28 Nov 2022
Externally publishedYes


Dive into the research topics of 'Contextual factors predicting compliance behavior during the COVID-19 pandemic: a machine learning analysis on survey data from 16 countries'. Together they form a unique fingerprint.

Cite this