Association Between Triglyceride–Glucose–Hemoglobin Index (TyHGB) and Osteoporosis Development and Interpretation of a Machine Learning Prediction Model Using NHANES Data
收藏资源简介:
This repository contains the source code and computational pipeline for the study titled "Association Between Triglyceride-Glucose-HDL-Cholesterol-Body Mass Index (TyHGB) and Osteoporosis: Development and Interpretation of a Machine Learning Prediction Model Using NHANES Data". Functionality: The code implements the statistical analysis and machine learning models described in the manuscript. Key features include: Data processing and cleaning of NHANES datasets (cycles 2005-2010, 2013-2014, 2017-2018). Calculation of the TyHGB index and other metabolic markers. Weighted logistic regression and Restricted Cubic Spline (RCS) analysis to evaluate associations. Development and comparison of four machine learning models (GBM, SVM, NN, KNN) using the caret package. Model interpretation using SHAP (SHapley Additive exPlanations) analysis. Dependencies & Environment: The analysis was conducted using R (version 4.4.2). Key R packages required include caret, randomForest (for Boruta), pROC, ggplot2, and shapley. A detailed list of dependencies can be found in the sessionInfo() output within the script headers. Usage: Please refer to the comments within the R scripts for step-by-step execution instructions. The pipeline reproduces the baseline characteristics, regression models, and machine learning performance metrics reported in the paper. Data Availability: The raw data used in this study are publicly available from the National Health and Nutrition Examination Survey (NHANES) database



