An Interpretable Stacking Ensemble Model with SHAP for Geriatric Depression Prediction: Analysis of the NHANES 2005-2023 Database
DOI:
https://doi.org/10.4108/eetpht.11.11671Keywords:
Geriatric Depression, Predictive Model, Stacking Ensemble Learning, SHAPAbstract
OBJECTIVE: Leveraging multimodal data from the 2005-2023 National Health and Nutrition Examination Survey (NHANES) database, this study aims to develop a predictive method for the geriatric depression that combines high predictive accuracy with good interpretability, thereby providing support for in-depth exploration of the pathogenesis and risk factors of geriatric depression.
METHODS: Data from 8760 participants aged 65 and older in the NHANES database from 2005-2023 are utilized to develop and validate the stacking ensemble predictive model. Depression is assessed using the Patient Health Questionnaire-9 (PHQ-9) total score meeting or exceeding 10. Before the model construction, this work employs the normalization of training data and test data, Synthetic Minority Over-sampling Technique - Random Under-Sampling (SMOTE-RUS) hybrid sampling strategy to address the class imbalance, and the recursive feature elimination method based on the random forest (RFE-RF) for feature selection. A stacking ensemble predictive framework for depression is constructed based on the primary learners (Random Forest, SVM, XGBoost, and Logistic Regression) and meta-learners (SVM and Logistic Regression). Finally, the interpretable machine learning technique SHapley Additive exPlanations (SHAP) is used to visualize the model predictive outputs.
RESULTS: The XGBoost model demonstrated outstanding performance on the test set in terms of AUC (83.92%), while the Random Forest (RF) model excelled in sensitivity (71.05%). Subsequently, a specifically designed RFE-Stacking ensemble model, using RF and XGBoost as the primary learner and the SVM as the meta-learner, is developed. In comparison, this stacking ensemble model exhibits the best predictive performance with the biggest AUC (85.14%) and the highest sensitivity (78.71%). The SHAP interpretation reveals that general health condition, frequency of oral pain in the past year, marital status, history of mental health consultations in the past year, and frequency of urine leakage are the top five most influential factors in predicting the depression risk.
CONCLUSION: This stacking ensemble model enhances the performance of both the primary learners and the meta-learners. This verifies the feasibility and effectiveness of the proposed model in predicting the geriatric depression. This work integrating the stacking ensemble model with SHAP offers valuable clinical references for assessing the risk of depressive symptoms, which is beneficial to develop the personalized depression interventions and preventions in the elderly.
Downloads
References
[1] Yangfan Wang, Yinhuan Hu, Shaoyu Lu, Sha Liu, Xiaodong Feng, Hui Wang, Analysis and prediction on disease burden of depressive disorders among elderly population in China from 1990 to 2021, Chinese Journal of Prevention and Control of Chronic Diseases, 2025, 33(3): 178-184.
[2] Yosef Zenebe, Bay Akele, Mulugeta W/Selassie, Mogesie Necho, Prevalence and determinants of depression among old age: a systematic review and meta-analysis, Annals of General Psychiatry, 2021, 20(1):55.
[3] Ying Cheng, Yu Fang, Jinxin Zheng, Shiyang Guan, Meiti Wang, Wu Hong, The burden of depression, anxiety and schizophrenia among the older population in ageing and aged countries: an analysis of the Global Burden of Disease Study 2019, General Psychiatry, 2024, 37(1):e101078.
[4] Pengcheng Miao, Beier Lu, Rongji Ma, Yongkang Qian, Chenhua Hu, Hualing Chen, Ru Fan, Biyun Xu, Bingwei Chen, Identification of patients with senile depression by interpretable machine learning model-based on the US National Health and Nutrition Examination Survey, Modern Preventive Medicine, 2024,51(05):781-787.
[5] Hongbo Sun, Youcai Zhou, Xianqiang Zhang, Zhongxin Liang, Jinlan Chen, Ping Zhou, Xinjie Xue, Uncovering unseen ties: a network analysis explores activities of daily living limitations and depression among Chinese older adults, Frontiers in Aging Neuroscience, 2025, 17:1527774.
[6] Qian Wu, Jian Feng, Chenwei Pan, Risk factors for depression in the elderly: An umbrella review of published meta-analyses and systematic reviews, Journal of Affective Disorders, 2022. 307: 37-45.
[7] Zhuang Zhuang, Yunjing Zhang, Canyang Li, Ziwen Wang, Qiyuan Lv, The impact of self-rated health and self-care ability and their interaction on depression symptoms in the elderly, Modern Preventive Medicine, 2025, 52(03): 497-502.
[8] Heyan Xu, Dandan Geng, Yuna Wang, Yujia Chen, Lei Shi, Ning Du, Ziqiang He, Li Kuang, Association between living habits and depressive symptoms among the elderly in China, Journal of Chongqing Medical University, 2025,50(01):114-122.
[9] Minwei Gong, Jiaqi Shi, Jian Wu, Review on machine learning methods in predicting the risk of depression, Chinese Journal of Medical Physics, 2024,41(06):776-781.
[10] Yuqi Zhang, Analysis and prediction model development of factors affecting depressive symptoms in elderly individuals aged 65 and above in China, Master Dissertation, China Medical University, 2024.
[11] Hui Nie, Xiaoyan Wu, Detecting Depression Factors with Gradient Boosting Tree and Explainable Machine Learning Model SHAP. Data Analysis and Knowledge Discovery, 2024, 8(3): 41-52.
[12] Ahmed M. Salih, Zahra Raisi-Estabragh, Ilaria Boscolo Galazzo, Petia Radeva, Steffen E. Petersen, Karim Lekadir, Gloria Menegaz, A Perspective on Explainable Artificial Intelligence Methods: SHAP and LIME. Advanced Intelligent Systems, 2024, 7: 2400304.
[13] Zhen Zeng, Qiao Li, Eric D Caine, Yemisi Takwoingi, Baoliang Zhong, Yongsheng Tong, K K Cheng, Wenjie Gong, Prevalence of and optimal screening tool for postpartum depression in a community-based population in China, Journal of Affective Disorders, 2024, 348:191-199.
[14] Bruno Legendre, Damiano Cerasuolo, Olivier Dejardin, Annabel Boyer, How to deal with missing data? Multiple imputation by chained equations: recommendations and explanations for clinical practice, Nephrologie and Therapeutique, 2023, 19(3):171-179.
[15] Amadi G. Udu, Marwah T. Salman, Maryam K. Ghalati, Andrea Lecchini-Visintini, David R. Siddle, Hongbiao Dong, Emerging SMOTE and GAN variants for data augmentation in imbalance machine learning tasks: a review, IEEE ACCESS, 2025, 13: 113838-113853.
[16] Anbazhagan Mahadevan, Michael Arock, A class imbalance-aware review rating prediction using hybrid sampling and ensemble learning, Multimedia Tools and Applications, 2021, 80(5): 6911-6938.
[17] Weikuan Jia, Meili Sun, Jian Lian, Sujuan Hou, Feature dimensionality reduction: a review, Complex and Intelligent Systems, 2022, 8(3): 2663-2693.
[18] Annapoorani Selvaraj, Lakshmi Mohandoss, Enhancing Depression Detection: A Stacked Ensemble Model with Feature Selection and RF Feature Importance Analysis Using NHANES Data, Applied Sciences-Basel, 2024, 14(16):7366.
[19] Earvin S. Tio, Melissa C. Misztal, Daniel Felsky, Evidence for the biopsychosocial model of suicide: a review of whole person modeling studies using machine learning, Frontiers in Psychiatry, 2024, 14: 1294666.
[20] Yuxin Wang, Yuan Qiu, Liya Ren, Hao Jiang, Meijia Chen, Chaoqun Dong, Social support, family resilience and psychological resilience among maintenance hemodialysis patients: a longitudinal study, BMC Psychiatry, 2024, 24(1):76.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Manman Cui, Xian Li, Wei Gong

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This is an open access article distributed under the terms of the CC BY-NC-SA 4.0, which permits copying, redistributing, remixing, transformation, and building upon the material in any medium so long as the original work is properly cited.
