Stroke is a non-communicable disease that affects the brain and can lead to motor, sensory, and cognitive disabilities due to damage such as cerebral small vessel disease. The stroke, which consists of ischemic and hemorrhagic types, is one of the leading causes of death and disability worldwide. In this study, we model the risk of both ischemic and hemorrhagic stroke using a nonparametric binary logistic regression approach based on the least squares spline estimator. This model flexibly estimates odds ratios, enabling it to capture nonlinear relationships between risk factors and stroke occurrence. The analysis was conducted using secondary data from Dr. Drs. M. Hatta Brain Hospital in 2023, with risk factors including LDL, uric acid, triglycerides, blood glucose, sodium, and age. The results show that for age more than and equal to 50 years, both LDL and triglyceride levels more than and equal to 125 mg/dL, and blood glucose levels across all spline segments are associated with increased odds of ischemic stroke. Meanwhile, uric acid and sodium levels across all spline segments show a decreased tendency toward ischemic stroke risk. The model achieved an accuracy and AUC of 87.14% and 0.892, respectively, for in-sample data, and 90% and 0.911 for out-sample data. These findings demonstrate that spline-based nonparametric binary logistic regression provides a more flexible and accurate approach for modeling stroke risk. This study also supports the achievement of the SDGs by contributing to data-driven early detection and stroke prevention strategies.
