Abstract
Using the 2011 baseline data of the China health and retirement longitudinal study, we examined the associations between serum lipids and other risk factors and incident stroke, and developed and compared multiple machine learning models for stroke-risk prediction. After excluding records with missing values, 6538 participants were retained. Relevant variables were selected with the Boruta algorithm and used to train 10 machine learning models. Participants were randomly split into training (70%) and test (30%) sets. Model performance was evaluated by accuracy, sensitivity, specificity, F1-score, and the area under the curve. SHapley Additive exPlanations were applied to interpret the best-performing model. Boruta identified twelve key variables: depression, smoking, education, age, diabetes, gender, body-mass index, low-density lipoprotein (LDL) cholesterol, high-density lipoprotein cholesterol, total cholesterol (TC), triglycerides (TG), and the triglyceride-glucose index. Among all models, logistic regression achieved the highest test-set area under the curve (0.698; 95% CI: 0.618-0.777). SHapley Additive exPlanations analysis revealed that TC contributed most strongly to stroke risk, followed by TG and LDL. Beyond traditional risk factors, serum lipids - particularly TC, TG, and LDL - are key determinants of stroke in middle-aged and older Chinese adults. The logistic regression model offers both high performance and clear interpretability, making it a practical tool for stroke-risk screening in primary care settings.