Research Article

Non-Laboratory Variables for Adult Diabetes Risk Screening:A Comparison of Random Forest and XGBoost Using NHANES 2017–March 2020

Siqi Jin*
East China Normal University

* Corresponding author: [email protected]

Abstract

Diabetes is a growing chronic disease burden, and early screening is important for identifying individuals who may require further clinical testing. However, laboratory biomarkers such as glycated hemoglobin (HbA1c) may not always be available in low-cost population screening. Using the NHANES 2017-March 2020 pre-pandemic public-use data, we examined whether non-laboratory variables can support diabetes risk screening in adults. Adults aged 20 years or older were included. Diabetes status was defined using self-reported doctor diagnosis and HbA1c-based outcome labelling, while laboratory biomarkers were excluded from the main predictor set. The main non-laboratory predictors included demographic, socioeconomic, anthropometric, blood pressure, and lifestyle variables. Two tree-based machine learning models, Random Forest and XGBoost, were trained and evaluated on a testing set. Model performance was assessed using AUC, accuracy, sensitivity, specificity, F1-score, and Brier score. The final main sample contained 5,728 adults, including 1,071 diabetes cases. In the non-laboratory setting, XGBoost achieved higher AUC and much higher sensitivity than Random Forest. Adding HbA1c in a supplementary model substantially improved classification performance. These findings suggest that non-laboratory variables may support preliminary risk screening, but laboratory testing remains important for accurate diabetes classification.

Keywords: diabetes screening; non-laboratory variables; Random Forest; XGBoost; NHANES
Published: July 14, 2026
DOI: 10.54254/2753-8818/2026.35377
Volume: TNS Vol.181
pp. 59-65
Download PDF

References

  1. International Diabetes Federation. (2025).IDF Diabetes Atlas: Diabetes facts and figures. https://idf.org/about-diabetes/diabetes-facts-figures/
  2. Gwira, J. A., Fryar, C. D., & Gu, Q. (2024). Prevalence of total, diagnosed, and undiagnosed diabetes in adults: United States, August 2021–August 2023 (NCHS Data Brief No. 516). National Center for Health Statistics.
  3. Dinh, A., Miertschin, S., Young, A., & Mohanty, S. D. (2019). A data-driven approach to predicting diabetes and cardiovascular disease with machine learning.BMC Medical Informatics and Decision Making, 19, Article 211.
  4. Centers for Disease Control and Prevention, National Center for Health Statistics. (n.d.). National Health and Nutrition Examination Survey. National Center for Health Statistics. https://www.cdc.gov/nchs/nhanes/
  5. Akinbami, L. J., Chen, T.-C., Davy, O., Ogden, C. L., Fink, S., Clark, J., Riddles, M. K., & Mohadjer, L. K. (2022). National Health and Nutrition Examination Survey, 2017–March 2020 prepandemic file: Sample design, estimation, and analytic guidelines.Vital and Health Statistics, 2(190).
  6. American Diabetes Association Professional Practice Committee. (2026). Diagnosis and classification of diabetes: Standards of Care in Diabetes—2026.Diabetes Care, 49(Suppl. 1), S27–S49.
  7. Breiman, L. (2001). Random forests.Machine Learning, 45, 5–32.
  8. Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. InProceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining(pp. 785–794). Association for Computing Machinery.