Psychiatry Investig Search

CLOSE


Psychiatry Investig > Volume 22(9); 2025 > Article
Wang, Chang, Chen, Tzeng, Narumoto, Liang, and Yeh: Predicting 5-Year Survival and Mortality in Dementia Patients: A Data-Driven Approach Using XGBoost for Enhanced Care and Resource Allocation

Abstract

Objective

This study develops an eXtreme Gradient Boosting (XGBoost) regression model to identify key predictors of mortality and 5-year survival in dementia patients, highlighting the role of comorbidities. The findings highlight key risk factors that may facilitate targeted adjustments in clinical care and resource allocation for high-risk patients.

Methods

We used Taiwan’s National Health Insurance dataset to develop and validate an XGBoost model predicting 5-year survival in dementia patients aged 65 years or older. The cohort (n=6,556) was split into 80% for training, 10% for validation, and 10% for testing. A total of 24 variables, including comorbidities and demographic factors, were selected as predictors. Hyperparameters were tuned to optimize performance, with a learning rate of 0.1, 1,000 estimators, and a maximum depth of 10. Regularization techniques were applied to prevent overfitting.

Results

The XGBoost model achieved 81.86% accuracy in predicting 5-year survival, with a receiver operating characteristic area under the curve of 0.81 and a log loss of 0.61. Of the 37 initial features, 24 were included, and the top 10 predictors were nasogastric tube insertion, chronic kidney disease, cancer, lung disease, urinary tract infection, fracture, peripheral vascular disease, antidepressant use, hypertension, and upper gastrointestinal issues.

Conclusion

The XGBoost model effectively predicts 5-year survival in dementia patients, identifying key predictors that can guide targeted care, preventive strategies, and healthcare resource planning.

INTRODUCTION

Dementia, characterized by deficits in cognitive domains such as memory, language, attention, executive function, social cognition, calculation, and more, is a neurodegenerative disease that could significantly interfere with independent, daily functioning. In 2017, the United States reported 261,914 deaths where dementia was reported as an underlying cause of death, and age-adjusted death rates for dementia increased from 30.5 deaths per 100,000 in 2000 to 66.7 in 2017 [1]. Notably, death certificates underestimated dementia’s contribution to the mortality in the United States, with the actual estimate being 2.7 times larger than vital statistics data on the underlying cause of death [2]. In Taiwan, the number of individuals seeking medical care for dementia-related diseases reached 235,000 in 2019, an increase from the previous year’s 220,000. In 2020, the number of deaths due to vascular and unspecified dementia, Alzheimer’s disease, and neurodegenerative diseases was 3,180, ranking as the 12th leading cause of death among the population, and this rank increased with age, according to the statistics of the Ministry of Health and Welfare [3]. The data presents a major public health challenge globally and in Taiwan, with the comorbidity of dementia expected to result in even higher healthcare and social care costs.
To better support patients with dementia and allocate resources effectively, it is crucial to understand the risk factors and predictors of mortality and survivorship in this population. Efforts were put in to figuring out the predictors affecting mortality and comorbid conditions in patients with dementia. However, the conventional single-disease approach may be insufficient for individuals with dementia, given their frequent coexistence with multiple chronic conditions [4]. A previous study revealed that dementia was found to be associated with a higher risk of in-hospital mortality among older patients, with a mortality rate of 18.7% compared to 16.0% in patients without dementia, and that respiratory failure, acute renal failure, hemorrhagic stroke, and bloodstream infection were identified as significant predictors of worse outcomes in terms of in-hospital mortality [5]. Another study using data from the Italian Ministry of Health found that patients with dementia in the study had a higher in-hospital mortality rate of 24.3% compared to patients without dementia, who had a mortality rate of 9.7%, doubling the odds of in-hospital death (odds ratio 1.98; 95% confidence interval, 1.95-2.00), independent of age, sex, and comorbidities [6].
Previous studies have highlighted the importance of understanding the risk factors and predictors of mortality and survival outcomes in patients with dementia. Building upon these foundational studies, this project aims to develop a more comprehensive predictive model using modern machine learning algorithms. Machine learning is a field of artificial intelligence (AI) that involves developing algorithms and models that enable systems to perform tasks effectively without relying on rules-based programming. It allows computers to learn and improve from experience by identifying patterns in data. Machine learning has shown great promise in areas such as disease diagnosis, prognosis, and risk prediction in the realm of general healthcare or more specific areas such as brain disease [7,8]. Among all modern algorithms, eXtreme Gradient Boosting (XGBoost)—a highly efficient and scalable gradient-boosted decision tree algorithm—has gained widespread popularity due to its excellent performance in various prediction tasks. This ensemble learning method iteratively combines multiple weak predictive models to create a strong and robust model, exhibiting superior results, generalization performance, speed, and accuracy in diverse modeling scenarios [9].
This study aims to develop a predictive model using the XGBoost regression algorithm—a highly scalable, sparsity-aware gradient boosting method—to identify key predictors of mortality and 5-year survival in dementia patients. By leveraging XGBoost’s ability to handle large, complex datasets efficiently and incorporate regularization to mitigate overfitting, our model may better capture critical risk factors [9]. The resulting insights could inform preventive strategies and early interventions for high-risk patients, as well as guide resource allocation and healthcare planning to more effectively support individuals living with dementia.

METHODS

Derivation and validation cohort

The National Health Insurance (NHI) program in Taiwan was initiated in 1995, with the aim of providing mandatory health coverage to the entire Taiwanese population. By the end of 2010, the NHI had a coverage rate of about 99.6%, equivalent to 23 million residents [10]. Over these years, the program leads to an extensive and diverse dataset, which includes detailed information on healthcare utilization, medical diagnoses (coded with the International Classification of Diseases, Ninth Revision, Clinical Modification [ICD-9-CM] during the timespan of this study), treatments, and prescriptions, offering invaluable resources for epidemiological research, healthcare policy analysis, and health economics studies [11]. Its robust data allows for longitudinal studies and facilitates the exploration of health trends, outcomes, and disparities within the population.
We included patients aged 65 or older who had a new dementia diagnosis (ICD-9-CM codes 290.0-290.4, 331.0-331.2, 294.1) from board-certified neurologists or psychiatrists at least twice between January 1, 2002 and December 31, 2009. “Newly diagnosed” indicates no dementia diagnosis prior to January 1, 2002. Patients who returned to the outpatient department with the same new diagnosis were also included. We followed the study cohort until the end of the study (December 31, 2013, or death, whichever occurred first), and collected data including serum evaluations (including a complete blood count and biochemistries, iron, thyroid hormone, vitamin B12, folate, and syphilis), psychological examinations, and brain imaging (computed tomography or magnetic resonance imaging), which is a common procedure in Taiwan when diagnosing dementia. Mortality data was identified from claims records or the registry of catastrophic illnesses [12]. Cases with incomplete records or potential confounders were excluded to ensure a well-defined, high-quality dataset. To validate the data, experienced neurologists and psychiatrists held a meeting to agree on diagnostic variables. The detailed patient selection process and exclusion criteria are illustrated in flowchart (Figure 1). After identifying the study cohort, we randomly allocated 80% of the subjects to a derivation cohort for algorithm training, 10% to a validation sample for external model evaluation, and another 10% to a test sample for final model performance assessment (Figure 2).

Preparing data and selecting variables

These variables were collected from the time of inclusion through the end of the study period, reflecting whether each condition occurred at any point during clinical visits or hospitalizations. If a condition existed at any time within this interval, it was recorded as positive. Before model training, data went under a thorough data cleaning process—assessing structure, completeness, and quality; handling missing data; and validating data accuracy. Demographic information included age, sex, and level of urbanization (ranging from level 1 to level 5, with level 1 being the most urbanized region and level 5 being the least urbanized) [13]. Given our machine learning approach, we initially included a broad range of potentially relevant factors. We then tested all mortality-related variables to identify those with the highest predictive value and removed the others to prevent target leakage. During model development, any variable that reduced overall model performance was also excluded.

Training process

The process of training an XGBoost model consists of multiple steps. First, the data was divided into an 80% training group, a 10% validation group, and a 10% test group. Then, the model underwent iterative training by constructing decision trees, with each tree aiming to rectify mistakes made by its predecessors. XGBoost model is used due to its superior calibration, faster learning speed, and that it provides a better balance between bias and variance, which prevents overfitting via regularization [14,15]. Throughout the training process, the model’s hyperparameters, such as learning rate, maximum tree depth, and regularization terms, were adjusted to optimize performance.

Model parameters and hyperparameter tuning

Our main goal was to predict the 5-year survival probability, leading us to set the objective function to “binary” for this binary classification task. During the training process, we carefully tuned the hyperparameters to optimize the model’s performance while managing complexity and mitigating overfitting. An initial base score of 0.5 was used to provide a neutral starting point for training.
The subsampling parameters (specifically colsample_bylevel, colsample_bynode, colsample_bytree and subsample) were all set to 1, ensuring that all features were fully utilized at each level, split, and tree. This should maximize the model’s access to information, potentially leading to more accurate and optimal splits, as it considers all variables when making decisions. Additionally, full feature utilization in a comprehensive and representative simplifies the hyperparameter tuning process and ensures deterministic and reproducible results.
The learning rate was set to 0.1, and 1,000 trees were trained sequentially in each iteration (n_estimators=1,000). The maximum tree depth is set to 10, allowing the model to capture complex patterns in the data. Minimum child weight is set to 1, ensuring that nodes are only split when they contain a sufficient number of instances. Regularization terms (reg_alpha=0 and reg_lambda=1) were applied to control overfitting by penalizing large coefficients. The random state is set to 0 so that the results are reproducible (Table 1).

Ethics approval

All experimental procedures conformed to the standards set by the latest revision of the Declaration of Helsinki and were approved by the ethics committee of Taipei Veterans General Hospital, Taiwan (protocol code: 2018-07-016AC and date of approval: July 17, 2018). Informed consent was obtained from all subjects involved in the study.

RESULTS

Cohort characteristics and data preparation

From the initial dataset of 1,000,000 individuals in the Taiwan’s NHI database, and after applying the inclusion and exclusion criteria, a total of 6,556 patients diagnosed with dementia were included in the study cohort, representing an overall prevalence of 1.60%. The prevalence of dementia across various age groups (≥65 years) was distributed as follows: 9.69% in the 65-69 age group, 17.46% in the 70-74 group, 25.95% in the 75-79 group, 25.23% in the 80-84 group, and 15.18% in the 85-89 group, before slightly decreasing to 6.50% in those aged 90 and above. Of the 6,556 patients in this study, 1,777 died within 5 years, yielding an overall 5-year mortality rate of 27.10%.
Within the derivation cohort, those who died within 5 years tended to be older at enrollment, exhibit a higher burden of comorbidities, and experience acute or recent clinical events (e.g., lower respiratory infection, upper gastrointestinal bleeding, and nasogastric tube insertion) in the 3 months before recruitment. They also more frequently received antibiotics, benzodiazepines, and antipsychotics. In contrast, peripheral vascular disease and level of urbanization did not significantly differ between deceased and non-deceased patient. These findings are summarized in Table 2.
These patients were randomly divided into training, validation, and testing groups. For the not deceased category, 3,823 patients were in the training group, with 478 each in the validation and testing groups. For the deceased category, 1,422 patients were included in the training group, and 179 and 178 were allocated to the validation and testing groups, respectively (Figure 2). The average follow-up duration was 6.26 years, ranging from 0.03 to 12 years (standard deviation=5.50, median=6.11). The mean age at enrollment was 79.01 years, with 47.31% of participants being male (2,079 males).

Variable selection

First, we tested all the death-related variables to see which one could achieve the best overall result and found that 5-year death status came out best. As a result, death1y_duration, death1y_status, death2y_duration, death2y_status, death5y_duration, death5y_status, death6m_duration, death6m_status, death_duration, and death_status were omitted. These variables represent survival status at specific time intervals (1 year, 2 years, 5 years, 6 months, and overall status) and were removed because they directly correspond to the defined outcomes and thus cannot serve as independent predictors without causing target leakage. There were several variables that were also removed, which included age_group, habituating_city, and income_level. Age group represented patients’ ages grouped into predefined brackets (e.g., 65-69, 70-74 years, etc.). It was excluded while the precise numerical age variable was being used. habituating_city indicates the city or region where the patient resides, reflecting potential geographic or environmental influences on health outcomes. Income_level categorizes patients’ financial status into distinct tiers. However, these two variables did not improve the model in a positive way despite our effort. Eventually, out of 37 variables, 24 were selected for subsequent model development (Tables 2 and 3).

Model performance

The predictive model’s performance was evaluated using multiple metrics. It achieved an accuracy of 81.86% and a harmonic mean of precision and recall of 0.66. Precision was 0.68, and recall was 0.63. The true positive rate and true negative rate were 0.63 and 0.89, respectively (Table 4). The confusion matrix (Figure 3A) reported 424 true negatives, 113 true positives, 52 false positives, and 67 false negatives. The model’s logarithmic loss was 0.61. Additionally, the negative predictive value was 0.86, while the false positive rate and false discovery rate were 0.11 and 0.32, respectively (Table 4).

Precision-recall/receiver operating characteristic curve

The model’s performance was evaluated using both the receiver operating characteristic (ROC) curve and the precision-recall (PR) curve. The PR curve demonstrated an area under the curve (AUC) of 0.65, illustrating the trade-off between precision and recall across various classification thresholds (Figure 3B). The ROC curve achieved an AUC of 0.81, indicating its ability to distinguish between patients who survived and those who did not within 5 years (Figure 3C).

Features and importances

The XGBoost model identified and ranked the importance of 24 predictors based on their feature weights. Nasogastric tube insertion was the most influential predictor (weight=8.69×10-2), followed by chronic kidney disease (CKD) (weight=6.20×10-2), cancer (weight=5.17×10-2), and lower respiratory infection (weight=5.13×10-2). Other key predictors included urinary tract infection (weight=4.88×10-2), femoral neck fracture (weight=4.63×10-2), and peripheral vascular disease (weight=4.32×10-2). Additional significant predictors were antidepressant use, hypertension, upper gastrointestinal bleeding, and antibiotic prescription, with weights ranging between 4.26×10-2 and 4.01×10-2. Other relevant features included congestive heart failure, employment status, myocardial infarction, dyslipidemia, and stroke, among others, contributing to the model’s predictive capability (Table 3).

DISCUSSION

Main findings of our research

Our study identified a dementia prevalence of 1.60% (16,055/1,000,000) among the elderly population, which aligns with previous Taiwanese epidemiological data. A 1998 study from southern Taiwan reported a dementia incidence rate of 1.28% [16], and subsequent studies documented prevalence rates of 1.7%-4.3% among the elderly as of 2008 [17]. In our study, the overall 5-year mortality rate for dementia patients was 27.1%. By comparison, a large-scale Taiwanese study of 372,203 newly diagnosed dementia cases (2004-2013) reported an annual mortality rate of approximately 12% during 5 years of follow-up, and found that the prevalence of most comorbidities increased by 65%-150% after a dementia diagnosis [18]. While these findings broadly align with ours, our more stringent inclusion criteria of receiving a diagnosis of dementia twice may explain the higher cumulative mortality rate. A previous study with similar inclusion criteria reported a 38.7% mortality rate over a mean follow-up of 6.26 years [19].
Nasogastric tube insertion turned out to be the most influential predictor, with lower respiratory infection being the fourth. Both risk factors align with prior research showing that nasogastric tube insertion is associated with increased mortality in advanced dementia. Tube feeding may lead to gravitational back-flow, the presence of the tube across the gastric cardia, and infrequent esophageal body contractions [20]. Previous studies have also suggested that artificial feeding does not necessarily improve nutritional parameters or avoid nutritional worsening in patients with dementia [21-23]. In a prospective study of 67 community-based patients with advanced dementia (Diagnostic and Statistical Manual of Mental Disorders, Fourth Edition, Functional Assessment Staging Tool stage ≥7A), pneumonia was more common in the patients with a nasogastric tube, as has also been found by others [24]. Cox proportional hazards analysis further revealed that pneumonia, nasogastric tube insertion, and hypoalbuminemia (albumin <3.5 g/dL) were independent predictors of mortality [25].
A previous study with similar population with our research found that patients with CKD are at an elevated risk of dementia [26] and inversely, cognitive impairment significantly increases 1-year mortality risk in older patients with CKD [27]. In another large, matched cohort study compared over 242,000 adults with pre-dialysis CKD to similar individuals without, CKD patients had a higher incidence of dementia early on, and worsening CKD was strongly linked to higher all-cause mortality [28]. CKD may elevate mortality risk due to its frequent coexistence with cardiovascular risk factors, or may reflect more severe, subclinical vascular disease [29], which aligns with the findings in our study, with peripheral vascular disease ranking as the sixth risk factor towards dementia mortality. High incidence and mortality of urinary tract infection were also observed in dementia patients, with delayed treatment significantly increasing the risk of mortality [30,31]. Older adults with both cancer and dementia have higher mortality rates compared to those with cancer alone [32,33], and dementia is an independent predictor of 3-year mortality in patients with femoral neck fractures, contributing to increased vulnerability to complications and subsequent mortality [34,35].
This study demonstrates the effectiveness of using the XGBoost regression algorithm to predict the 5-year survival status of dementia patients and highlights the potential of applying AI in clinical settings. Several variables were removed during model development due to target leakage or lack of positive contribution. For instance, “habituating city” did not improve the model likely because Taiwan’s extensive healthcare accessibility and the relatively chronic nature of dementia reduce the impact of rural residence. Additionally, as Taiwan is a moderately developed country with a smaller wealth gap, “income level” also failed to enhance performance. This may be because Taiwan’s NHI program, which had a coverage rate of approximately 99.6% by 2010 [10], subsidizes most medications, minimizing the effect of income differences on health outcomes. In the future, these currently excluded variables could be reconsidered, and additional environmental or genetic factors might further refine the model.
The model’s performance, as presented by the ROC curve, yielded an AUC of 0.81, displaying discriminatory ability between patients at higher and lower risk of mortality. The curve’s significant rise toward the upper left corner suggests a balanced performance between sensitivity and specificity. The incorporation of these critical comorbidities—such as CKD, cancer, urinary tract infection, and hypertension—enables the model to offer insights that can assist healthcare providers in predicting survival outcomes and prioritizing care for high-risk individuals. However, the trade-off reflected in the PR curve, with an AUC of 0.65, highlights the inherent challenge of maintaining high precision as recall increases. This pattern is common in imbalanced datasets, where identifying more positive cases (higher recall) often comes at the cost of a decline in precision [36,37]. Overall, the model enables healthcare providers to more effectively predict survival outcomes and potentially prioritize care for those at greater risk.

Comparison with previous models

In comparison to traditional models, the XGBoost model has the potential to achieve superior predictive performance. A previous study used Cox proportional hazards regression to create a mortality prediction model in community-dwelling older adults with dementia, and achieved an optimism-corrected integrated area under the receiver operating characteristic curve of 0.76, with time-specific AUCs of 0.75 at 5 years [38]. With the robust dataset from Taiwan’s NHI system and the XGBoost algorithm’s ability to handle complex datasets [9], our study achieved an accuracy of 81.86% and an AUC of 0.81, thus showing effectiveness in managing multiple interacting predictors, capturing the relationships between comorbidities and mortality risk in dementia patients.
For models that have achieved higher accuracy and specificity, a study applied a transfer-learning framework, combining data from both older and younger European populations to refine its model performance, and achieved a geometric accuracy of 87%, specificity of 99%, and sensitivity of 76% [39]. However, Western populations often have different genetic predispositions and lifestyle factors, including grief processes, coping mechanisms, and perceptions of stigma compared to Asian populations [40]. Research also revealed heterogeneity in sex-patterns between ethnics [41], incidence of dementia [42], and even usage of assessment tools [43]. These differences underscore the relevance of research tailored to Asian populations.
Moreover, healthcare systems and access to care vary significantly between regions. Taiwan’s NHI system provides comprehensive longitudinal healthcare data for nearly the entire population, which allows for more in-depth tracking of comorbidities and healthcare utilization patterns over time [44]. In contrast, the European model relies on public datasets with a focus on early biomarkers, which may be less representative of the typical clinical picture in Asian populations. These geographic and demographic differences suggest that while the European model performs well in its context, its direct applicability to Asian populations is limited. Our model, specifically developed for a Taiwanese (Asian) cohort, fills this gap by incorporating the region’s unique healthcare and demographic characteristics, making it a more relevant tool for predicting dementia risk and mortality in this population.

Clinical implications

The findings from this study have several potential clinical implications for the management of dementia patients. The predictive model developed using the XGBoost algorithm may be integrated into clinical practice to assist healthcare providers in identifying dementia patients who are at higher risk of mortality. By recognizing high-risk individuals, clinicians can prioritize resource allocation, implement timely interventions, and potentially improve survival outcomes. This approach aligns with personalized medicine, where interventions are tailored to an individual’s specific risk profile, thus optimizing care and minimizing unnecessary interventions.
Furthermore, the integration of this model into healthcare systems, such as Taiwan’s NHI, may contribute to more efficient healthcare planning and resource distribution. This model may serve as a decision-support tool for healthcare providers, potentially aiding in planning for palliative care, monitoring, and targeted interventions based on the patient’s risk profile. The predictive capability of the model could also support discussions with patients and their families about prognosis, facilitating more informed decision-making regarding care goals and expectations.
The study also underscores the potential role of machine learning in enhancing clinical decision-making by providing robust, data-driven insights. As healthcare systems continue to embrace AI, predictive models like the one developed in this study may become integral in managing complex, chronic conditions such as dementia, ultimately contributing to improved patient care and outcomes.

Strengths and limitations

This study offers several key strengths. First, we leveraged a large, population-based dataset from Taiwan’s NHI, covering nearly the entire Taiwanese population. This provides insights into the Taiwanese Han population and may be applicable to broader East Asian populations, in contrast to similar studies that rely on American or European datasets [39,45]. Second, we demonstrated the feasibility of applying AI to develop a prediction model in a medical context. By using the XGBoost algorithm, we managed a complex, high-dimensional dataset and achieved better recall than many traditional analytical methods, providing actionable insights for clinicians and policymakers. Third, focusing on a 5-year survival window delivers practical prognostic information that can guide resource allocation and patient care strategies.
Despite these advantages, there are also limitations. First, we did not capture the degree of severity, frequency, or duration of the variables, which may further influence mortality risk. Another limitation of our study is related to handling class imbalance. Although XGBoost provides the scale_pos_weight parameter to adjust for imbalances by increasing the weight of positive class instances, our study had to use a fixed value of 1.00 due to current software limitations, despite the heuristic suggesting a value of approximately 2.69 based on our data. Data augmentation techniques were not employed, as they are less suitable for the structured, administrative dataset used in our analysis. Our data comes from a single healthcare system, which may limit generalizability to populations with different demographic or healthcare infrastructures. Additionally, relying solely on administrative data—rather than more detailed clinical records—can introduce coding errors or missing information. With recent advancements in large language models and AI algorithms, future studies could benefit from incorporating more granular medical records as well as the currently excluded variables, lifestyle factors, social support, etc. The use of cross-sectional data instead of purely retrospective data could also be considered to support real-time mortality assessments. Due to small sample sizes, we were not able to develop subtype-specific models yet, because doing so could risk overfitting. Dementia with Lewy bodies was often coded with 294.1 (dementia in conditions classified elsewhere) under ICD-9-CM clinically due to health insurance policies. Future work with larger, better coded and more granular datasets may enable distinct prediction models for each dementia subtype. Additionally, a normal-variant cohort would help determine whether the model’s predictive metrics are specifically capturing mortality risk within the dementia population or may reveal more general risk factors present in the broader elderly population. In future research, we would like to incorporate a comparison group to evaluate how well these metrics generalize beyond the dementia population.
In conclusion, this study demonstrates the potential of using the XGBoost algorithm to predict the 5-year survival status of dementia patients, achieving high accuracy and identifying key predictors of mortality. While limitations exist, such as the generalizability of the dataset and the use of administrative data, the model’s strengths in accuracy and the insights provided into key clinical factors are noteworthy. The findings suggest that integrating this model into clinical practice could enhance decision-making, support personalized care, and contribute to more efficient healthcare resource allocation. Future research should address the limitations and explore the inclusion of additional predictors to further refine and improve the model. Overall, this study provides a foundation for advancing dementia care using machine learning technologies.

Notes

Availability of Data and Material

Data is not published due to ethical restrictions, but are available upon request.

Conflicts of Interest

The authors have no potential conflicts of interest to disclose.

Author Contributions

Conceptualization: Ta-Chuan Yeh, Chih-Sung Liang. Data curation: Yi-Guang Wang, Hsin-An Chang, Mu-Hong Chen. Formal analysis: Yi-Guang Wang, Hsin-An Chang, Mu-Hong Chen. Funding acquisition: Ta-Chuan Yeh. Methodology: Chih-Sung Liang, Mu-Hong Chen. Project administration: Mu-Hong Chen. Resources: Nian-Sheng Tzeng, Hsin-An Chang. Writing—original draft: Yi-Guang Wang. Writing—review & editing: Ta-Chuan Yeh, Jin Narumoto, Nian-Sheng Tzeng.

Funding Statement

This study was funded by Tri-Service General Hospital (TSGH-D-114142). The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Acknowledgments

None

Figure 1.
Patient selection flowchart. Flowchart showing patient selection from Taiwan’s National Health Insurance Research Database (1996-2013). From 1,000,000 individuals, 16,055 had dementia diagnoses. After applying inclusion and exclusion criteria (age ≥65 years, specialist diagnosis, ≥2 diagnoses between 2002-2009), 6,556 patients comprised the final study cohort. Mortality data was obtained through linkage with Taiwan’s National Death Registry, with follow-up until death or December 31, 2013. ICD-9-CM, International Classification of Diseases, Ninth Revision, Clinical Modification.
pi-2024-0351f1.jpg
Figure 2.
Data grouping and model arguments. This figure illustrates the distribution of patient data across the training, validation, and testing subsets based on their 5-year survival status. For the “not deceased” group, the training set includes 3,823 samples, while the validation and testing sets each contain 478 samples. In the “deceased” group, the training set consists of 1,422 samples, with 179 samples in the validation set and 178 in the testing set.
pi-2024-0351f2.jpg
Figure 3.
Model performance. A: Confusion matrix showing the binary classification results: 424 true negatives, 113 true positives, 52 false positives, and 67 false negatives. B: Precision-recall curve, illustrating the trade-off between precision and recall across different classification thresholds. The AUC is 0.65. C: ROC curve, which assesses the model’s ability to distinguish between positive and negative classes. The AUC is 0.80, indicating good discrimination power and its effectiveness in classification tasks. ROC, receiver operating characteristic; AUC, area under the curve.
pi-2024-0351f3.jpg
Table 1.
The key parameters utilized in the XGBoost algorithm model
Arguments Value
objective Binary:logistic
base_score 0.5
colsample_bylevel 1
colsample_bynode 1
colsample_bytree 1
gamma 0
gpu_id -1
importance_type Gain
learning_rate 0.1
max_delta_step 0
max_depth 10
min_child_weight 1
n_estimators 1,000
n_jobs 1
num_parallel_tree 1
random_state 0
reg_alpha 0
reg_lambda 1
scale_pos_weight 1
subsample 1
validate_parameters False

The learning rate is set at 0.1, providing a balanced trade-off between learning speed and accuracy. The maximum tree depth is 10, enabling the model to capture more intricate patterns. Both the subsample and colsample_bytree parameters are set to 1, indicating that all available data and features are used for training and tree construction, respectively. The gamma value of 0 permits unrestricted node splitting, while a min_child_weight of 1 allows for greater flexibility in partitioning nodes. Regularization is achieved through a lambda value of 1 (L2 regularization), which helps to prevent overfitting by penalizing large weights, and an alpha value of 0 (L1 regularization), indicating that no sparsity is enforced.

Table 2.
Demographic and clinical characteristics of the cohorts at enrollment
Characteristic Not deceased (N=4,779) Deceased (N=1,777) Total (N=6,556) p
Sex, male 2,079 (67.37) 1,007 (32.63) 3,086 (47.07) <0.001*
Enrollment age (yr) <0.001*
 65 to <70 541 (85.20) 94 (14.80) 635 (9.69) <0.001*
 70 to <75 932 (81.40) 213 (18.60) 1,145 (17.46) <0.001*
 75 to <80 1,253 (73.66) 448 (26.34) 1,701 (25.95) <0.001*
 80 to <85 1,126 (68.08) 528 (31.92) 1,654 (25.23) <0.001*
 85 to <90 680 (68.34) 315 (31.66) 995 (15.18) <0.001*
 ≥90 247 (57.98) 179 (42.02) 426 (6.50) <0.001*
Employment status, employed 2,822 (70.78) 1,165 (29.22) 3,987 (60.81) <0.001*
Level of urbanization <0.001*
 1 (most urbanized) 1,246 (74.12) 435 (25.88) 1,681 (25.64) 0.637
 2 1,225 (71.76) 482 (28.24) 1,707 (26.04) 0.637
 3 776 (72.59) 293 (27.41) 1,069 (16.31) 0.637
 4 791 (72.70) 297 (27.30) 1,088 (16.60) 0.637
 5 (least urbanized) 741 (73.29) 270 (26.71) 1,011 (15.42) 0.637
Chronic comorbidities <0.001*
 Hypertension 4,023 (71.80) 1,580 (28.20) 5,603 (85.46) <0.001*
 Diabetes 2,282 (70.24) 967 (29.76) 3,249 (49.56) <0.001*
 Femoral neck fracture 470 (65.73) 245 (34.27) 715 (10.91) <0.001*
 Chronic kidney disease 426 (59.17) 294 (40.83) 720 (10.98) <0.001*
 Stroke 3,046 (71.18) 1,233 (28.82) 4,279 (65.27) <0.001*
 Chronic obstructive pulmonary disease 2,217 (68.09) 1,039 (31.91) 3,256 (49.66) <0.001*
 Congestive heart failure 1,037 (64.93) 560 (35.07) 1,597 (24.36) <0.001*
 Cancer 839 (61.20) 532 (38.80) 1,371 (20.91) <0.001*
 Myocardial infarction 182 (64.54) 100 (35.46) 282 (4.30) <0.001*
 Coronary artery disease 2,632 (70.75) 1,088 (29.25) 3,720 (56.74) <0.001*
 Dysrhythmia 1,528 (69.08) 684 (30.92) 2,212 (33.74) <0.001*
 Peripheral vascular disease 343 (69.43) 151 (30.57) 494 (7.54) 0.072
Acute/recent clinical conditions within 3 months before recruitment <0.001*
 Weight loss 57 (56.44) 44 (43.56) 101 (1.54) <0.001*
 Upper gastrointestinal bleeding 171 (59.17) 118 (40.83) 289 (4.41) <0.001*
 Lower respiratory infection 299 (50.59) 292 (49.41) 591 (9.01) <0.001*
 Urinary tract infection 759 (62.06) 464 (37.94) 1,223 (18.65) <0.001*
 Nasogastric tube insertion 427 (51.26) 406 (48.74) 833 (12.71) <0.001*
Recent prescription within 3 months before recruitment <0.001*
 Antibiotics 574 (60.29) 378 (39.71) 952 (14.52) <0.001*
 Benzodiazepine 1,924 (70.42) 808 (29.58) 2,732 (41.67) <0.001*
 Antidepressant 1,239 (71.91) 484 (28.09) 1,723 (26.28) 0.284
 Antipsychotic 1,831 (68.78) 831 (31.22) 2,662 (40.60) <0.001*

Data are presented as number (%).

* indicates significance at p<0.05.

Table 3.
Predictive features and their relative importance in the XGBoost mortality model
Feature Weight (×10-2)
Nasogastric tube insertion 8.69
Chronic kidney disease 6.20
Cancer 5.17
Lower respiratory infection 5.13
Urinary tract infection 4.88
Femoral neck fracture 4.63
Peripheral vascular disease 4.32
Antidepressant 4.26
Hypertension 4.14
Upper gastrointestinal bleeding 4.07
Antibiotic prescription 4.01
Congestive heart failure 3.98
Employment status 3.71
Sex 3.69
Myocardial infarction 3.69
Dyslipidemia 3.64
Chronic obstructive pulmonary disease 3.48
Coronary artery disease 3.43
Enrollment age 3.35
Stroke 3.32
Antipsychotic prescription 3.26
Benzodiazepine prescription 3.18
Diabetes mellitus 2.91
Weight loss 2.84

This table presents the predictive features and their corresponding importances in the predictive model for predicting mortality and 5-year survival in dementia patients. The “Feature” column includes factors such as nasogastric tube insertion, chronic kidney disease, lower respiratory infection, among others. The “Weight” column quantifies the contribution of each feature to the model’s predictions, with higher weights indicating greater predictive influence.

Table 4.
Summary of model evaluation metrics
Metric Value
Accuracy 0.82
F1 score 0.66
Precision 0.68
Recall 0.63
Log loss 0.61
ROC AUC 0.81
Precision-recall AUC 0.65
True positive rate 0.63
True negative rate 0.89
False positive rate 0.11
False discovery rate 0.32
Positive predictive value 0.68
Negative predictive value 0.86

This table presents the summary of model evaluation metrics. The overall accuracy is 81.86%. The harmonic mean of precision and recall (F1 score) is 0.66. Precision is 0.68, and recall is 0.63. The logarithmic loss is 0.61. The area under the ROC curve is 0.81, indicating good class discrimination. The area under the precisionrecall curve is 0.65. ROC, receiver operating characteristic; AUC, area under the curve.

REFERENCES

1. Kramarow EA, Tejada-Vera B. Dementia mortality in the United States, 2000-2017. Natl Vital Stat Rep 2019;68:1-29.

2. Stokes AC, Weiss J, Lundberg DJ, Xie W, Kim JK, Preston SH, et al. Estimates of the association of dementia with US mortality levels using linked survey and mortality records. JAMA Neurol 2020;77:1543-1550.
crossref pmid pmc
3. Division 2, Department of Statistics, Ministry of Health and Welfare, Taiwan. International Dementia Day Health and Welfare Statistics Bulletin [Internet]. Ministry of Health and Welfare, Taiwan; 2021. Available at: https://www.mohw.gov.tw/dl-71799-1d824fee-a486-4504-9c7d-5d819c6848b2.html. Accessed July 28, 2024.

4. Chu CS, Cheng SL, Bai YM, Su TP, Tsai SJ, Chen TJ, et al. Multimorbidity pattern and risk for mortality among patients with dementia: a nationwide cohort study using latent class analysis. Psychiatry Investig 2023;20:861-869.
crossref pmid pmc pdf
5. De Matteis G, Burzo ML, Della Polla DA, Serra A, Russo A, Landi F, et al. Outcomes and predictors of in-hospital mortality among older patients with dementia. J Clin Med 2022;12:59
crossref pmid pmc
6. Zuliani G, Gallerani M, Martellucci CA, Reverberi R, Brombo G, Cervellati C, et al. Dementia and in-hospital mortality: retrospective analysis of a nationwide administrative database of elderly subjects in Italy. Aging Clin Exp Res 2022;34:1037-1045.
crossref pmid pdf
7. Mitra D, Paul A, Chatterjee S. Machine Learning in Healthcare. In: Anbarasan K, editor. AI Innovation in Medical Imaging Diagnostics. Hershey: IGI Global Scientific Publishing, 2021, p. 37-60.

8. Modat M, Cash DM, Dos Santos Canas L, Bocchetta M, Ourselin S. Machine Learning for Alzheimer’s Disease and Related Dementias. In: Colliot O, editor. Machine Learning for Brain Disorders. New York: Humana, 2023, p. 807-846.

9. Chen T, Guestrin C. XGBoost: A Scalable Tree Boosting System. The 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; 2016 Aug 13-17; San Francisco. New York: Association for Computing Machinery, 2016, p.785-794.

10. PC Lee. Introduction to the National Health Insurance of Taiwan. In: Lee PC, Wang JTH, Chen TY, Peng CH, editor. Digital Health Care in Taiwan. Cham: Springer International Publishing, 2022, p. 1-15.

11. Lin L yu, Warren-Gash C, Smeeth L, Chen PC. Data resource profile: the National Health Insurance Research Database (NHIRD). Epidemiol Health 2018;40:e2018062
crossref pmid pmc
12. Cheng CL, Chien HC, Lee CH, Lin SJ, Yang YHK. Validity of in-hospital mortality data among patients with acute myocardial infarction or stroke in National Health Insurance Research Database in Taiwan. Int J Cardiol 2015;201:96-101.
crossref pmid
13. Liu CY, Hung YT, Chuang YL, Chen YJ, Weng WS, Liu JS, et al. Incorporating development stratification of Taiwan townships into sampling design of large scale health interview survey. J Health Manag 2006;4:1-22.

14. Dutta J, Kim YW, Dominic D. Comparison of Gradient Boosting and Extreme Boosting Ensemble Methods for Webpage Classification. 2020 Fifth International Conference on Research in Computational Intelligence and Communication Networks (ICRCICN); 2020 Nov 26-27; Bangalore. Piscataway: IEEE, 2020, p.77-82.

15. Razavizadeh NT, Salari M, Jafari M, Sabaghian E, Ghavami V. Comparison of two methods, gradient boosting and extreme gradient boosting to predict survival in Covid-19 data. J Biostat Epidemiol 2023;9:378-387.
crossref
16. Liu CK, Lai CL, Tai CT, Lin RT, Yen YY, Howng SL. Incidence and subtypes of dementia in southern Taiwan: impact of socio‐demographic factors. Neurology 1998;50:1572-1579.
crossref pmid
17. Fuh JL, Wang SJ. Dementia in Taiwan: past, present, and future. Acta Neurol Taiwan 2008;17:153-161.
pmid
18. Huang ST, Loh CH, Lin CH, Hsiao FY, Chen LK. Trends in dementia incidence and mortality, and dynamic changes in comorbidity and healthcare utilization from 2004 to 2017: a Taiwan national cohort study. Arch Gerontol Geriatr 2024;121:105330
crossref pmid
19. Cheng CM, Chang WH, Chiu YC, Chen MH, Liao WT, Yang CH, et al. Risk score for predicting mortality in people with dementia: a nationwide, population-based cohort study in Taiwan with 11 years of follow-up. J Clin Psychiatry 2019;80:18m12629
pmid
20. Lee YF, Hsu TW, Liang CS, Yeh TC, Chen TY, Chen NC, et al. The efficacy and safety of tube feeding in advanced dementia patients: a systemic review and meta-analysis study. J Am Med Dir Assoc 2021;22:357-363.
crossref pmid
21. Henderson CT, Trumbore LS, Mobarhan S, Benya R, Miles TP. Prolonged tube feeding in long-term care: nutritional status and clinical outcomes. J Am Coll Nutr 1992;11:309-325.
crossref pmid
22. Kim YI. To feed or not to feed: tube feeding in patients with advanced dementia. Nutr Rev 2001;59:86-88.
crossref pmid
23. Finucane TE, Christmas C, Travis K. Tube feeding in patients with advanced dementia: a review of the evidence. JAMA 1999;282:1365-1370.
crossref pmid
24. Gomes GF, Pisani JC, Macedo ED, Campos AC. The nasogastric feeding tube as a risk factor for aspiration and aspiration pneumonia. Curr Opin Clin Nutr Metab Care 2003;6:327-333.
crossref pmid
25. Alvarez‐Fernández B, García‐Ordoñez MA, Martínez‐Manzanares C, Gómez‐Huelgas R. Survival of a cohort of elderly patients with advanced dementia: nasogastric tube feeding as a risk factor for mortality. Int J Geriat Psychiatry 2005;20:363-370.
crossref
26. Cheng KC, Chen YL, Lai SW, Mou CH, Tsai PY, Sung FC. Patients with chronic kidney disease are at an elevated risk of dementia: a population-based cohort study in Taiwan. BMC Nephrol 2012;13:129
crossref pmid pmc pdf
27. Di Rosa M, D’Alia S, Guarasci F, Soraci L, Pierpaoli E, Lenci F, et al. Cognitive impairment, chronic kidney disease, and 1-year mortality in older patients discharged from acute care hospital. J Clin Med 2020;9:2202
crossref pmid pmc
28. Hiramatsu R, Iwagami M, Nitsch D. Association between chronic kidney disease and incident diagnosis of dementia in England: a cohort study in Clinical Practice Research Datalink. BMJ Open 2020;10:e033811
crossref pmid pmc
29. Hannedouche T, Albouze G, Chauveau P, Lacour B, Jungers P. Effects of blood pressure and antihypertensive treatment on progression of advanced chronic renal failure. Am J Kidney Dis 1993;21:131-137.
crossref pmid
30. Lai H, Kolanko M, Li LM, Parkinson ME, Bourke NJ, Graham NSN, et al. Population incidence and associated mortality of urinary tract infection in people living with dementia. J Infect 2024;88:106167
crossref pmid
31. Lai H, Kolanko MA, Li L, Tzoulaki I, Sharp DJ, Soreq E. Investigating the impact of treatment timing on urinary tract infections in dementia at the population level. Alzheimers Dement 2023;19:e072984
crossref
32. Varshney C, Mittal P, Bishra M, Arora DY. Systematic review of the association between cancer-related dementia and mality: systematic review and meta-analysis. Int J Innov Res Sci Eng Technol 2023;11:28-30.
crossref
33. Caba Y, Dharmarajan K, Gillezeau C, Ornstein KA, Mazumdar M, Alpert N, et al. The impact of dementia on cancer treatment decision-making, cancer treatment, and mortality: a mixed studies review. JNCI Cancer Spectrum 2021;5:pkab002
crossref pmid pmc pdf
34. Berggren M, Stenvall M, Englund U, Olofsson B, Gustafson Y. Co-morbidities, complications and causes of death among people with femoral neck fracture - a three-year follow-up study. BMC Geriatrics 2016;16:120
crossref pmid pmc pdf
35. Rajeev A, Ali M, Tuinebreijer W, Zourob E, Anto J. Preexisting dementia is associated with higher mortality rate in patients with femoral neck fracture. Aging Med (Milton) 2021;4:12-18.
crossref pmid pmc pdf
36. Menzies T, Dekhtyar A, Distefano J, Greenwald J. Problems with precision: a response to “Comments on ‘Data Mining Static Code Attributes to Learn Defect Predictors.’”. IIEEE Trans Software Eng 2007;33:637-640.
crossref
37. Khayatkhoei M, AbdAlmageed W. Emergent asymmetry of precision and recall for measuring fidelity and diversity of generative models in high dimensions. arXiv:2306.09618 [Preprint] June 16, 2023. Available at: https://arxiv.org/abs/2306.09618. Accessed October 13, 2024.

38. Deardorff WJ, Barnes DE, Jeon SY, Boscardin WJ, Langa KM, Covinsky KE, et al. Development and external validation of a mortality prediction model for community-dwelling older adults with dementia. JAMA Intern Med 2022;182:1161-1170.
crossref pmid pmc
39. Danso SO, Zeng Z, Muniz-Terrera G, Ritchie CW. Developing an explainable machine learning-based personalised dementia risk prediction model: a transfer learning approach with ensemble learning algorithms. Front Big Data 2021;4:613047
crossref pmid pmc
40. Zeng A, Santulli RB. Cultural and ethnic differences in dementia family caregiving: a comparison of the experiences of Chinese American and non‐Chinese American dementia caregivers. Alzheimers Dement 2022;18:e062677
crossref pdf
41. Lo JC, Chandra M, Lee DR, Lee C, Gilsanz P. Sex‐specific patterns in dementia incidence among older Asian and Pacific Islander adults. Alzheimers Dement 2023;19:e083189
crossref
42. Mayeda ER, Glymour MM, Quesenberry CP Jr, Whitmer RA. Heterogeneity in 14-year dementia incidence between Asian American subgroups. Alzheimer Dis Assoc Disord 2017;31:181-186.
crossref pmid pmc
43. Morris JC, Cummings JL. Workshop reports from the third Asia-pacific regional meeting of the international working group on harmonization of dementia drug guidelines. Alzheimer Dis Assoc Disord 2006;20:313
crossref pmid
44. Ho Chan WS. Taiwan’s healthcare report 2010. EPMA J 2010;1:563-585.
crossref pmid pmc pdf
45. Wang L, Sha L, Lakin JR, Bynum J, Bates DW, Hong P, et al. Development and validation of a deep learning algorithm for mortality prediction in selecting patients with dementia for earlier palliative care interventions. JAMA Netw Open 2019;2:e196972
crossref pmid pmc
TOOLS
Share:
Facebook Twitter Linked In Google+
METRICS Graph View
  • 0 Crossref
  •   Scopus
  • 986 View
  • 37 Download


ABOUT
AUTHOR INFORMATION
ARTICLE CATEGORY

Browse all articles >

BROWSE ARTICLES
Editorial Office
#522, G-five Central Plaza, 27 Seochojungang-ro 24-gil, Seocho-gu, Seoul 06601, Korea
Tel: +82-2-537-6171  Fax: +82-2-537-6174    E-mail: psychiatryinvest@gmail.com                

Copyright © 2025 by Korean Neuropsychiatric Association.

Developed in M2PI

Close layer
prev next