Lifestyle predictors of depression and anxiety during COVID-19: a machine learning approach Academic Article uri icon

  • Overview
  • Research
  • Identity
  • Additional Document Info
  • View All


  • Introduction

    Recent research has suggested an increase in the global prevalence of psychiatric symptoms during the COVID-19 pandemic. This study aimed to assess whether lifestyle behaviors can predict the presence of depression and anxiety in the Brazilian general population, using a model developed in Spain.


    A web survey was conducted during April-May 2020, which included the Short Multidimensional Inventory Lifestyle Evaluation (SMILE) scale, assessing lifestyle behaviors during the COVID-19 pandemic. Depression and anxiety were examined using the PHQ-2 and the GAD-7, respectively. Elastic net, random forest, and gradient tree boosting were used to develop predictive models. Each technique used a subset of the Spanish sample to train the models, which were then tested internally (vs. the remainder of the Spanish sample) and externally (vs. the full Brazilian sample), evaluating their effectiveness.


    The study sample included 22,562 individuals (19,069 from Brazil, and 3,493 from Spain). The models developed performed similarly and were equally effective in predicting depression and anxiety in both tests, with internal test AUC-ROC values of 0.85 (depression) and 0.86 (anxiety), and external test AUC-ROC values of 0.85 (depression) and 0.84 (anxiety). Meaning of life was the strongest predictor of depression, while sleep quality was the strongest predictor of anxiety during the COVID-19 epidemic.


    Specific lifestyle behaviors during the early COVID-19 epidemic successfully predicted the presence of depression and anxiety in a large Brazilian sample using machine learning models developed on a Spanish sample. Targeted interventions focused on promoting healthier lifestyles are encouraged.


publication date

  • 2022