Machine-learning approaches to identify determining factors of happiness during the COVID-19 pandemic: retrospective cohort study

Objective To investigate determining factors of happiness during the COVID-19 pandemic. Design Observational study. Setting Large online surveys in Japan before and during the COVID-19 pandemic. Participants A random sample of 25 482 individuals who are representatives of the Japanese population. Main outcome measure Self-reported happiness measured using a 10-point Likert scale, where higher scores indicated higher levels of happiness. We defined participants with ≥8 on the scale as having high levels of happiness. Results Among the 25 482 respondents, the median score of self-reported happiness was 7 (IQR 6–8), with 11 418 (45%) reporting high levels of happiness during the pandemic. The multivariable logistic regression model showed that meaning in life, having a spouse, trust in neighbours and female gender were positively associated with happiness (eg, adjusted OR (aOR) for meaning in life 4.17; 95% CI 3.92 to 4.43; p<0.001). Conversely, self-reported poor health, anxiety about future household income, psychiatric diseases except depression and feeling isolated were negatively associated with happiness (eg, aOR for self-reported poor health 0.44; 95% CI 0.39 to 0.48; p<0.001). Using machine-learning methods, we found that meaning in life and social capital (eg, having a spouse and trust in communities) were the strongest positive determinants of happiness, whereas poor health, anxiety about future household income and feeling isolated were important negative determinants of happiness. Among 6965 subjects who responded to questionnaires both before and during the COVID-19 pandemic, there was no systemic difference in the patterns as to determinants of declined happiness during the pandemic. Conclusion Using machine-learning methods on data from large online surveys in Japan, we found that interventions that have a positive impact on social capital as well as successful pandemic control and economic stimuli may effectively improve the population-level psychological well-being during the COVID-19 pandemic.