A machine learning model exploring the relationship between chronic medication and COVID-19 clinical outcomes

Characteristics of the cohort

The final dataset had 121,650 participants (Fig. 1), with a mean age of 53 years (SD 20), 68,528 (57%) of which were female (Supplementary Material 2). In the logistic regression analysis for participants aged 18 to 65, age at exposure was the strongest predictor of hospitalisation (60–64 years OR 12.75, CI 11.03–14.82). Other factors were rituximab use (OR 15.19, CI 7.06–35.26), other antivirals (OR 14.37, CI 1.38–309.14), polypharmacy (OR 8.15, CI 4.06–16.52), and heparins (OR 8.07, CI 6.74–9.66). Among participants over 65, rituximab (OR 3.08 CI 1.56–6.31), calcineurin inhibitors (OR 3.01 CI 2.15–4.26), and Janus Kinase inhibitors (OR 2.96 CI 1.3–7.12) were most strongly associated with hospitalisation risk (Supplementary Material 3). Age was less important in the older groups (75–79 age OR 1.22, CI 1.13–1.31).

Fig. 1figure 1

Description of the cohort used in the study. Data was collected from several data administrative databases centralized by AQuaS within the PADRIS framework. Those participants with missing GMA data were excluded from the study, as those younger than 18 years old. The final dataset used for analysis had 121,650 participants and included 255 variables spanning sociodemographic factors, comorbidities, chronic medication, and clinical outcomes

Risk of mortality among participants aged 18 to 65 was also determined by age (OR 74.21, CI 28.33–299.93). Other factors included rituximab use (OR 18.91, CI 4.49–54.1), polypharmacy (OR 16.3, CI 3.9–46.04), heart failure (OR 16.05, CI 11.35–22.09), and systemic corticosteroids (OR 15.39, CI 11.69–19.96) (Supplementary Material 4). In participants over 65, age remained a key determinant of mortality risk (85–89 years OR 4.15, CI 3.7–4.66), GMA score (very high risk GMA OR 2.87, CI 2.54–3.25), calcineurin inhibitors (OR 2.15, CI 1.48–3.07), and selective immunosuppressants (OR 1.97, CI 1.45–2.64; Supplementary Material 5).

The risk of ICU admission was also strongly associated with age (60–64 years 18.42, CI 11.82–30.71;), rituximab use (OR 14.87, CI 4.99–36.13), calcineurin inhibitors (OR 8.66, CI 5.51–13.02), direct-acting anticoagulants (OR 7.99, CI 4.57–13.03), and polypharmacy (OR 7.06, CI 1.69–19.9, Supplementary Material 6). Among participants over 65, the most relevant factors for ICU admission were calcineurin inhibitors (OR 3.53, CI 1.94–5.94), a history of transplants (OR 3.13, CI 1.72–5.24), male sex (OR 3.01, CI 2.65–3.43), and the use of selective immunosuppressants (OR 2.53, CI 1.46–4.1; Supplementary Material 7).

Finally, features associated with in-hospital death in participants aged 18 to 65 were age (60–64 years OR 8.53, CI 2.7–51.77), use of calcineurin inhibitors (OR 6.38, CI 3.72–10.39), selective immunosuppressants (OR 5.8, CI 3.49–9.2) or polypharmacy (OR 5.69, CI 1.31–17.51; Supplementary Material 8). Comparable characteristics to mortality risk, whether occurring in or outside the hospital were found relevant in participants over 65 (Supplementary Material 9).

Machine learning model performance and interpretability

Eight distinct models were evaluated, one for each outcome and age group combinations. This approach allowed isolating the impact of pharmacological variables while minimizing collinearity with the disease-related variables for which these medications were prescribed. XGBoost was selected due to its robust tree-based ensemble, enabling the modelling of non-linear relationships, mitigation of predictor collinearity, and superior performance compared to K-Nearest Neighbors, AdaBoost, and Support Vector Machine methods (Supplementary Material 10).Pharmacological models demonstrated similar performance overall (Figs. 2 and 3). However, models for participants older than 65 performed worse. For hospitalisation risk, the model for participants aged 18 to 65 (Fig. 2a) achieved an AUC of 0.70 (CI 0.69–0.71), compared to 0.58 (CI 0.57–0.60) for those older than 65 (Fig. 3a). Similarly, for mortality risk in participants aged 18 to 65 (Fig. 2b) showed strong discrimination (AUC 0.89, CI 0.85–0.92), versus 0.65 (CI 0.63–0.67) model in older participants (Fig. 3b).

Fig. 2figure 2

ROC values with a 95% CI for the pharmacological models evaluated in participants 18 to 65. XGBoost models for prescription medication-related features were built for the four outcomes: a risk of hospitalisation from COVID-19, b risk of death, c risk of ICU admission, and d risk of death while hospitalized separately in participants aged 18 to 65 years old

Fig. 3figure 3

ROC values with a 95% CI for the pharmacological models evaluated in participants above 65. XGBoost models for prescription medication-related features were built for the four outcomes: a risk of hospitalisation from COVID-19, b risk of death, c risk of ICU admission, and d risk of death while hospitalized separately in participants aged older than 65 years

For ICU admission, the model for participants aged 18 to 65 (Fig. 2c) exhibited a similar performance to that of the model for older participants (Fig. 3c), with AUC values of 0.74 (CI 0.70–0.78) and 0.73 (CI 0.67–0.79), respectively. In contrast, the models predicting the risk of death during hospitalisation demonstrated greater variability: it achieved an AUC of 0.53 (CI 0.51–0.55) for participants aged 18 to 65, while it reached an AUC of 0.65 (CI 0.64–0.66) for those over 65 (Figs. 2d and 3d).

Models based on disease-related features performed similarly to those using medication data. The best performing model predicted risk of death in participants aged 18 to 65 (AUC 0.92, CI 0.89–0.95), while the hospitalisation model for those older than 65 showed the lowest performance (AUC 0.59, CI 0.58–0.61; Supplementary Material 11).

Variable importance

Most models consistently identified age and sex as the most influential features, with older age and male sex linked to worst COVID-19 outcomes. In participants aged 18 to 65, hospitalisation risk was associated with the number of prescribed drugs and heparin use (Fig. 4a). In participants older than 65, the use of systemic corticosteroids was also linked to a higher risk (Fig. 4b).

Fig. 4figure 4

SHAP summary plot for hospitalisation risk in the chronic medication and demographics model. Variable importance (SHAP values) for the XGBoost model to determine the risk of hospitalisation from COVID-19 in participants by age groups: a from 18 to 65 years old, and b above 65 years old, for the pharmacological features model. SHAP values are ranked in descending order based on the absolute value of their influence on the XGBoost model; high values mean a higher probability of hospitalisation. Purple represents high variable values and yellow represents lower variable values (in the categorical variables one-hot-encoded, it is 0 yellow and 1 purple). Each point represents an instance (participant) for that variable in the dataset

In mortality models, key features for participants aged 18 to 65 included the use ACEi, ARBs, and HMG-CoA reductase inhibitors, all linked to increased risk (Fig. 5a); in those older than 65, ACEi and systemic corticosteroids were the main determinants (Fig. 5b).

Fig. 5figure 5

SHAP summary plot for mortality risk in the chronic medication and demographics model. Variable importance (SHAP values) for the XGBoost model to determine the risk of death from COVID-19 in participants by age groups: a from 18 to 65 years old, and b above 65 years old, for the pharmacological features model. SHAP values are ranked in descending order based on the absolute value of their influence on the XGBoost model; high values mean a higher probability of hospitalisation. Purple represents high variable values and yellow represents lower variable values (in the categorical variables one-hot-encoded, it is 0 yellow and 1 purple). Each point represents an instance (participant) for that variable in the dataset

Predictors of ICU admission in both age groups included the use of HMG-CoA reductase inhibitors and ACEi or ARBs (Fig. 6a, b). While ACEi and ARBs were linked to a slightly lower ICU admission risk, participants using HMG-CoA reductase inhibitors were at higher risk.

Fig. 6figure 6

SHAP summary plot for ICU admission risk in the chronic medication and demographics model. Variable importance (SHAP values) for the XGBoost model to determine the risk of ICU admission from COVID-19 in participants by age groups: a from 18 to 65 years old, and b above 65 years old, for the pharmacological features model. SHAP values are ranked in descending order based on the absolute value of their influence on the XGBoost model; high values mean a higher probability of hospitalisation. Purple represents high variable values and yellow represents lower variable values (in the categorical variables one-hot-encoded, it is 0 yellow and 1 purple). Each point represents an instance (participant) for that variable in the dataset

In models evaluating COVID-19 outcomes and chronic diseases, main predictors of hospitalisation in participants aged 18 to 65 included age, sex, obesity, social status, smoking, and metabolic disorders (Supplementary Material 12), while in those older than 65, key features were age, dementia, sex, and social status (Supplementary Material 12). Mortality risk models identified age, sex, neoplasms, social status, COPD, and diabetes as significant predictors in the 18 to 65 age group (Supplementary Material 13); whereas age, sex, renal insufficiency, and metabolic disorders were the most relevant factors in those older than 65 (Supplementary Material 13).

Finally, the top predictors of ICU admission in participants aged 18 to 65 were sex, hypertension, obesity, and diabetes (Supplementary Material 14), whereas in those older than 65, age, sex, dementia, metabolic disorders, and GMA were most relevant (Supplementary Material 14). Local model predictions for hospitalisation risk in three representative participants aged 18 to 65 are shown in Supplementary Material 15, with accurate predictions at p 0.05.

Sensitivity analysis

A multivariate analysis was conducted to evaluate the relationship between selected comorbidities and their associated medications, specifically hypertension (ACEi and ARBs), diabetes (biguanides and DPP4 inhibitors), and metabolic disorders (statins).

Participants receiving ACEi or ARBs for hypertension did not show an increased risk for any of the outcomes compared to those with compared to patients not using ACEi or ARBs to treat hypertension.. However, in individuals over 65, treatment with ACEi and ARBs was associated with a reduced risk of death (OR 0.78, 95% CI 0.68–0.92 and OR 0.8, 95% CI: 0.68–0.95, respectively, Supplementary Material 17). Among participants aged 65 or below, none of the analysed medications were linked to an increased risk of hospitalisation or ICU admission (Supplementary Material 16, Supplementary Material 18).

For diabetic participants, treatment with DPP4 inhibitors in the 18 to 65 age group was associated with a higher risk of death (OR 3.03, 95% CI 1.17–7.00, Supplementary Material 17). In contrast, among participants over 65, biguanides demonstrated a protective effect on overall mortality (OR 0.79, 95% CI 0.68–0.92), an effect not observed with DPP4 inhibitors (OR 1.2, 95% CI 0.96–1.49). Furthermore, when comparing biguanides to DPP4 inhibitors in participants older than 65, biguanides consistently showed better outcomes across all measures. Statins did not provide a protective effect for any of the assessed outcomes in either age group.

Comments (0)

No login
gif