Introduction

Lower respiratory tract infections (LRTIs) remain a significant global health challenge, especially in their more severe presentations, such as community-acquired pneumonia (CAP)1,2. In 2021, it was estimated that there were 344 million episodes of LRTI worldwide, representing 4350 episodes per 100,000 people. LRTI were also responsible for 2,2 million deaths, making them the leading infectious causes of mortality globally1. In Europe, pneumonia imposes a substantial economic burden, with annual costs estimated at $10.6 billion3. Among hospitalised patients, up to 23% of patients admitted to the hospital develop severe CAP (sCAP), and the mortality rates among these patients are notably higher, with 30-day mortality reaching 27% and rising to 47% within a year4.

As the mortality due to sCAP remains extremely high up to a year after the hospital admission, several co-adjuvant treatments have been proposed to improve acute, intermediate, and long-term outcomes. For instance, glucocorticoids and macrolides have been used to reduce the systemic inflammation observed in sCAP patients; however, the results of trials of these treatments have been inconsistent and sometimes contradictory5,6. HMG-CoA reductase inhibitors, known as statins, primarily used in clinical practice to control LDL-C levels, have shown benefits such as reducing inflammation, protecting against oxidative stress, slowing cell growth, and modulating the immune response7. In a recent adaptive platform trial, simvastatin therapy demonstrated a 95.9% probability of superior to standard care in critically ill patients with COVID-19, improving organ support–free days and mortality compared to those receiving standard care8. Furthermore, a meta-analysis revealed that statin use was associated with lower mortality, reduced intensive care unit (ICU) admissions, and a decreased need for mechanical ventilation in the critically ill population, highlighting the potential benefits7. However, no trials of statins in sCAP patients have been reported. Therefore, our objective was to simulate a randomised controlled trial (RCT) to evaluate the impact of statins on short- and long-term mortality in patients with sCAP admitted to the ICU.

Results

A total of 4,742 patients met the inclusion criteria, and 26.8% (1,273/4,742) of the cohort received statin therapy before and/or during and after the sCAP episode. Patients in the statin group were predominantly male (58.4% vs. 53.8%, p = 0.005), had a higher median age (72 years vs. 65 years, p < 0.001), and a higher Charlson comorbidity index (7 vs. 5, p < 0.001). Regarding laboratory variables, patients in the statin group had significantly higher white blood cells minimum (10.2 vs. 9.6, p = 0.0001) and maximum (13.2 vs. 12.3, p = 0.0002), as well as higher maximum creatinine levels (1.3 vs. 1.1, p < 0.001). Furthermore, high-flow nasal cannula therapy (HFNC) was more common in the statin group (4.6% vs. 2.7%, p = 0.001). Statin patients showed lower hospital mortality (14.5% vs. 17.6%, p = 0.014) and 28-day mortality (18.7% vs. 22.3%, p = 0.008). A detailed breakdown of the distribution and p-values for each covariate in both groups is provided in Table 1.

Table 1 Baseline characteristics of the cohort.

Propensity score matching

The results in Table 2 summarise the characteristics of patients with sCAP admitted to the ICU, comparing those who received statins with those who did not, both in the unmatched and propensity score-matched cohorts. In the unmatched cohort, patients receiving statins were significantly older (71.01 vs. 64.4 years, p < 0.001) and had a higher Charlson Comorbidity Index (6.7 vs. 5.3, p < 0.001), indicating a greater burden of comorbidities. The 2:1 ratio was selected as it achieved optimal covariate balance while retaining a substantial number of patients, preserving statistical power without significant loss of participants (Fig. 3). After propensity score matching, baseline characteristics between the statin and non-statin groups were well balanced, as indicated by the reduced standardised mean differences (SMD) in Fig. 1. No significant differences were found in age, Charlson Comorbidity Index, or other relevant variables. In the unmatched cohort, the B statistic was 60.1%, indicating a substantial imbalance between the groups (values above 25% suggest a notable imbalance), and the R statistic was 0.90, reflecting a high degree of variability in the propensity scores. In contrast, after matching, the B statistic was reduced to 8.0%, indicating that the matching process significantly improved the group balance. Additionally, the R statistic increased to 0.96, suggesting a substantial overlap in propensity scores between the matched groups.

Table 2 Balance of mean standardised mean differences (SMD) for selected variables before and after propensity score matching.
Fig. 1
figure 1

Flowchart of Patient Selection and Total Numbers After Propensity Score Matching. This flowchart illustrates the patient selection process from the MIMIC-IV database. As listed in the panel, 426,489 patients were excluded for various reasons. The final cohort consisted of 4,742 patients, of which 2,783 were included in the matched dataset after performing propensity score matching.

Average Treatment Effect (ATE) for patients receiving statin treatment compared to those not receiving statins was estimated to be −4.03% (95% CI: −6.9% to −1%), indicating a statistically significant reduction in mortality in those treated with statins (p = 0.007). Additionally, the Inverse probability weighting (IPW) method showed a similar result for the ATE estimate of −3.7% (95% CI: −6.1% to −1.3%), significantly reducing mortality (p = 0.001). Both methods suggest a beneficial effect of statin therapy on mortality in this cohort Table 3.

Table 3 Treatment effect estimates for Mortality.

Survival analysis

The Kaplan-Meier analysis shows a significant difference in survival probability between patients treated with statins and those who were not, with a log-rank p-value < 0.0001 (Fig. 2). The survival curve suggests that the statin-treated group has better survival over time than the non-statin group. The Cox regression analysis confirms this difference, with a hazard ratio (HR) of 0.78 (95% CI: 0.71–0.87; p < 0.0001) (Table 4),1 indicating that statin-treated patients have a 22% relative risk reduction for mortality compared to those not receiving statins, adjusting for time to death. This result is statistically significant, as demonstrated by the Wald, log-rank, and likelihood ratio tests (all p < 0.001).

Fig. 2
figure 2

Visualisation of covariate balance using Love plots based on standardised mean differences (SMD) before and after propensity score weighting. The plot shows the standardised % bias across covariates for unmatched () and matched (×) groups. The balance improves significantly after matching, as indicated by the reduced bias for the covariates listed.

Table 4 Cox regression.

Sensitivity analyses

The sensitivity analysis evaluated the impact of patient age and macrolide use on mortality using Propensity Score Matching (PSM) and IPW. For patients aged 18–55 years (n = 1011), neither PSM (ATE: −0.008; 95% CI: [−0.116, 0.098]; p = 0.871) nor IPW (ATE: 0.023; 95% CI: [−0.073, 0.119]; p = 0.638) demonstrated a statistically significant effect on mortality. In contrast, for patients aged 56–75 years (n = 1959), both PSM and IPW significantly reduced mortality. Among patients aged 56–75 years, the ATEs were − 0.102 (95% CI: [−0.158, −0.045]; p < 0.001) via PSM and − 0.093 (95% CI: [−0.139, −0.047]; p < 0.001) via IPW. Similarly, for those aged over 75 years, the ATEs were − 0.119 (95% CI: [−0.180, −0.057]; p < 0.001) and − 0.107 (95% CI: [−0.161, −0.053]; p < 0.001), respectively Supplementary Tables 1–2.

Regarding macrolide use, significant mortality reduction was observed in patients not receiving macrolides (PSM: −0.094; IPW: −0.090; p < 0.001), while findings for patients receiving macrolides were inconsistent, with only IPW suggesting a modest benefit (ATE: −0.055; p = 0.049). These results highlight the differential effects of age and macrolide therapy on mortality Supplementary Tables 3–4.

Discussion

This study found that chronic and de novo statin therapy in patients with sCAP significantly reduced 28, 90, and 365-day mortality. This effect demonstrated through PSM and IPW analyses, was further supported by Kaplan-Meier and Cox regression models, which showed sustained mortality reduction over time.

These results align with studies showing how statins prevent severe infections and improve clinical outcomes in bacterial and viral infections through their pleiotropic effects. For instance, Malekinejad et al. described atorvastatin´s anti-inflammatory effects in models of lung inflammation, involving PPARγ receptors reducing alveolar damage and macrophage recruitment, as well as COX-2 expression induced by paraquat9. Other in-vivo and in-vitro studies have demonstrated statin´s antioxidant10, coagulation-modulating11, anti-inflammatory effects12,13,14, and its antibacterial and antifungal properties15,16. Erkkilä et al. demonstrated through a murine model how statin treatment reduced mortality from infections caused by pathogens like Chlamydia and Salmonella, which require cholesterol for intracellular proliferation16. Furthermore, Boyd et al. found that simvastatin has effects such as enhanced bacterial clearance and reduced neutrophil infiltration17. However, not all findings are consistent, as Radigan et al. concluded in a murine model that rosuvastatin did not improve survival or reduce inflammation in influenza A infections18. The mechanisms behind statins’ clinical benefits in pneumonia are not fully understood, but studies suggest a relationship that warrants further exploration.

Clinical evidence also supports statins’ potential to reduce inflammation and infection mortality. In 2001, Liappis et al. conducted the first study on statins in infectious diseases, showing that in-hospital statin use among 388 patients with bacteraemia significantly reduced mortality among statins users (OR 7.6, 95% CI 1.01–57.5)19. Subsequently, a 2010 study focused on statin use in pneumonia, including studies from 2005 to 2009 where their use was consistently associated with reduced mortality20, aligning with our findings. Furthermore, multiple studies examined statins’ effects on CAP; for instance, a 2019 pilot RCT by Sapey et al. found that simvastatin improved neutrophil function, correlating with better outcomes in CAP patients21. Also, a meta-analysis undertaken by Chopra et al. consisting of 13 studies including 254,950 patients revealed that statin use was associated with lower mortality in CAP (OR, 95% CI: 0.62, 0.54–0.71)22. Other studies, like the Grudzinska et al. cohort, reported significantly lower in-hospital mortality among CAP patients on statins (OR 0.515; 95% CI 0.403–0.660)22. Similarly, Douglas et al. found that statin users had a 33% lower six-month mortality risk following pneumonia with an adjusted HR of 0.67, suggesting that treating 15 CAP patients with statins could prevent one death over six months23. However, unlike our study, these studies focused only on short-term benefits and CAP and included only small proportions of patients admitted to the ICU or meeting sCAP criteria; thus, our findings are novel.

The use of statins in viral pneumonia, especially during outbreaks, has also been well-studied. During the 2009 H1N1 epidemic, statin therapy was associated with reduced disease severity among hospitalised patients24. Two observational studies further found that statin use was linked to reductions in 30-day mortality (41% and 59%, respectively) in patients hospitalised with influenza infections25,26. For COVID-19 specifically, evidence on statins is varied. Rodriguez-Nava et al. reported a reduction in 28-day mortality among COVID-19 who used statins27. Additionally, a meta-analysis including seven PSM studies involving 2,398 patients (1,075 on statins) showed that statin use was associated with nearly 40% lower odds of severe illness or death in pneumonia (OR; 95% CI: 0.59; 0.35–0.99)28. Finally, another recent RCT found that simvastatin combined with standard therapy in COVID-19 reduced mortality risk8. On the other hand, a 2023 meta-analysis of 10 studies with 2,167 COVID-19 patients found no significant differences in mortality (OR 0.96, 95% CI 0.58–1.59, p = 0.86) or hospital length of stay (SMD − 0.10, 95% CI −0.78–0.59, p = 0.78). However, PCSK9 inhibitors improved mortality outcomes29. These results suggest that statins may benefit patients across different types of pneumonia, supporting their potential as an adjunctive treatment to improve survival in severe cases. However, most of these studies did not match the depth of bias control or examine long-term mortality as our study did through PSM analysis, which showed the protective effects of statins persisting up to one year.

In recent years, studies have increasingly used PSM and adjusted models to evaluate the impact of statins on outcomes in pneumonia and COVID-19 patients, addressing potential confounding factors. For instance, a 2020 study by Lohia et al. assessed COVID-19 mortality in 1,014 patients and found that home statin use significantly reduced mortality in the total cohort (OR 0.66; 95% CI 0.46–0.95; p = 0.03). This effect was even more pronounced in the PSM cohort of 466 patients, where statin users had a further mortality reduction (OR 0.56; 95% CI 0.37–0.83; p = 0.004)30. Another study in China by Zhang et al. demonstrated that COVID-19 patients on statins had lower 28-day mortality after PSM, with an adjusted hazard ratio of 0.58. This result was robust across Cox time-varying and marginal structural models31. However, none of these studies specifically examined statin use in sCAP, making our study unique as the first to investigate this association in an sCAP cohort. Furthermore, our study includes four times the number of patients compared to previously reported PSM studies and extends the analysis to long-term mortality (up to 365 days), adjusting for a comprehensive range of confounders and competitive mortality to reduce bias. This extensive adjustment and the novel focus on sCAP enhance the robustness and relevance of our findings in a way that previous studies have not achieved.

Our study has strengths and limitations that should be acknowledged. Firstly, applying propensity score matching is a significant methodological advantage, as it helps reduce selection bias and balance confounding variables between statin users and non-users. This approach allows us to better assess the relationship between statin use and mortality outcomes, thereby providing stronger evidence for the observed associations. However, as our analysis is based on retrospective data from the MIMIC-IV database, potential biases inherent to electronic health records, such as missing or inaccurate variables, cannot be handled. Although propensity score matching was applied to mitigate confounding, it is possible that other unmeasured variables or residual confounders were not fully adjusted, which could influence the estimated impact of statin use on mortality. Therefore, our findings should be interpreted as hypothesis-generating or foundation for future research. Additionally, the classification of statin use presents certain challenges. The database lacks details on treatment adherence and dose adjustments during hospitalisation. Notably, observational studies —even when designed to emulate randomized controlled trials—cannot establish definitive causal relationships. These limitations highlight the need for prospective studies and controlled clinical trials to control confounding factors better and assess the effects of continued statin use in patients with sCAP. The consistent results from our analysis lend robustness to our findings, emulating the effects of an RCT by minimising confounding variables and providing a more reliable assessment of statins’ impact on mortality in sCAP patients. Despite the retrospective nature of this study, our approach strengthens the evidence that statins may offer a protective benefit in severe pneumonia cases, warranting further investigation.

In conclusion, this study demonstrates that statin therapy is associated with significantly lower acute and long-term mortality in patients with severe community-acquired pneumonia admitted to the ICU. These findings suggest a potential therapeutic role for statins in improving outcomes in this high-risk population. Our findings underscore the need for further research to understand the mechanisms underlying these effects, especially to determine if benefits persist among patients without dyslipidaemia. As our understanding of statins’ relationship with pneumonia continues to evolve, additional studies are needed to validate these findings and address current knowledge gaps. Ultimately, randomised controlled trials will be essential to confirm statins’ role as co-adjuvants in respiratory infections and inform clinical practice to enhance patient care.

Methods

This observational cohort study employed the MIMIC-IV database, a comprehensive, high-resolution data archive for critical care research developed by the MIT Lab for Computational Physiology. The database contains deidentified data from approximately 70,000 ICU admissions at Beth Israel Deaconess Medical Center (BIDMC) between 2008 and 201932,33. Research use of MIMIC-IV has been approved by the Institutional Review Boards of BIDMC and MIT, with support from the National Institute of Biomedical Imaging and Bioengineering (NIBIB)32,33,34. The Massachusetts Institute of Technology and Beth Israel Deaconess Medical Center approved the establishment of the MIMIC-IV database, and written informed consent was obtained to collect raw data. Further information about the database can be found elsewhere32,33,34. All personal information was anonymised, and only a random code was used to identify specific patients. Therefore, the Ethics Committee of Clinica Universidad de La Sabana (2023-08-03) and Universidad de La Sabana (Med-519) waived the requirement for informed consent and ethical approval. All methods were carried out in accordance with relevant guidelines and regulations.

Definitions

Severe Community-Acquired pneumonia (sCAP)

Patients with sCAP in the MIMIC-IV database were identified using the ERS/ESICM definition, classifying sCAP as community-acquired pneumonia requiring ICU admission. Immunosuppressed patients, such as those receiving corticosteroids or chemotherapy, undergoing transplantation, or diagnosed with haematological malignancies or HIV with a CD4 count below 200, were excluded35.

Appropriate antibiotic therapy

Patients who received an antibiotic endorsed by international guidelines (IDSA/ATS guidelines). Notably, all patients received at least one β-lactam (including carbapenems) or a fluoroquinolone36.

Study population and data collection

The MIMIC-IV dataset includes detailed information on demographics, clinical observations, laboratory and microbiology results, drug prescriptions, fluid balance, diagnosis codes, procedure codes, and mortality. Additionally, longer-term mortality outcomes were determined by matching MIMIC-IV data with the Social Security Administration’s Death Master File.

From the MIMIC-IV database, which contains data on 431,231 patients, those diagnosed with pneumonia were identified using the ten most relevant ICD-9 codes (Supplementary Table 5), a method previously utilised in our research to ensure consistent identification of pneumonia cases37,38. Inclusion criteria: initiating appropriate antimicrobial therapy for pneumonia within 48 h of hospital admission and a treatment duration of at least 72 h. Patients with ventilator-associated pneumonia, those not admitted to the ICU, or those with infections other than pneumonia were excluded from the final cohort. Further details on patient selection are provided in Fig. 3.

Fig. 3
figure 3

Match graph evaluation. The match graph illustrates the quality of the propensity score matching by depicting the distribution of propensity scores for treated and untreated groups. Evidence of overlap in the propensity scores between groups indicates a well-balanced match.

Then, we created a comprehensive dataset including 255 variables, encompassing demographic information (e.g., gender, age), comorbidities (e.g., myocardial infarction, congestive heart failure), vital signs (e.g., heart rate, blood pressure), laboratory results (e.g., haemoglobin, creatinine levels), and treatments administered (e.g., ventilator support, statins, antibiotic and corticosteroid use).

Study outcomes

This study’s primary objective was to evaluate statin therapy’s impact on short- and long-term mortality in patients with sCAP admitted to the ICU through simulated RCT. Secondary objectives include identifying the most prevalent comorbidities and describing possible factors influencing mortality.

Data depuration and variable selection

The dataset underwent several preprocessing steps to ensure data quality and suitability for analysis. These steps included variable selection from the 255 variables extracted from the MIMIC-IV database. To describe the studied population, we selected baseline demographic variables, including age, gender, baseline laboratories not included in severity scores (SOFA and SAPS II), generalised malignancy diagnosis, immunosuppression diagnosis, the Charlson comorbidity index (CCI), chronic kidney disease, transplant status, autoimmune status, creatinine at day-1 and Glasgow coma scale at day-1 of hospitalisation. The CCI was used as a composite measure to capture overall comorbidity burden. Although adjusting for individual comorbidities could provide a more granular approach, not all components of the Charlson system were available. Therefore, we applied the CCI score39,40,41, which has been updated and validated in multiple contemporary cohorts, including critically ill populations. Finally, the treatment with statins was defined as long-term therapy or newly initiated therapy after newly diagnosed dyslipidaemia was initiated before ICU admission but during the concurrent admission. Outcome variables included the number of days to death and whether the patient died during ICU stay or hospitalisation.

Statistical analysis

Continuous data normally distributed was described using mean and standard deviation (Mean ± SD), with comparisons between groups assessed using the independent samples t-test. Non-normally distributed continuous data were presented as the median and interquartile range (M [Q1, Q3]), and group comparisons were made using the Kolmogorov-Smirnov test. Categorical or nominal data are expressed as the number of cases and the proportion (N [%]), with comparisons conducted using the chi-square test. Rank data are compared using the rank sum test.

Multiple imputation techniques were applied to address missing values in the dataset; variables and patients with more than 30% of missing data were excluded from the analysis. For the remaining cases, binary variables were imputed using the mode, and lineal variables were imputed using the k-means method. PSM was employed to create comparable treatment and control groups by balancing covariates between the two groups. This balance was achieved by weighing each participant through a logistic regression model fitted to estimate propensity scores for each patient. Subsequently, the treatment assignment, statin therapy, was used for the matching method.

The model was adjusted using the “psmatch2” command in Stata, which facilitates calculating propensity scores and patient matching. A 2:1 matching ratio was applied using the nearest-neighbour method. To ensure adequate group comparability, balance before and after matching was evaluated through SMD and the R and B statistics were calculated42,43,44. SMD scores were calculated to assess covariate adjustment, and different matching ratios (3:1, 2:1, and 1:1) were tested to identify the most efficient approach (Fig. 4). Tables based on the matched dataset were presented with bivariate analysis and OR and 95% confidence intervals (CI).

Fig. 4
figure 4

Kaplan-Meier survival curve comparing mortality between patients treated with statins and those not treated. The curve demonstrates the cumulative survival probability over time, with patients in the statin-treated group showing a different survival trajectory compared to the non-treated group. Panel A: Kaplan-Meier survival curve showing patient survival probabilities over 28 days. Panel B: Kaplan-Meier survival curve illustrating survival probabilities over 90 days.

After PSM, the matched dataset was used to fit the survival model. The survival analysis using statin therapy was assessed at 28, 90 and 365 days, with the dataset filtered to include observations at or before these time points. Survival analysis was conducted using Kaplan-Meier curves to evaluate the impact of statin therapy on mortality among patients in the matched dataset. The model assessed the association between statin therapy and mortality while adjusting for potential confounders. Cox proportional hazard regression or other appropriate survival models were utilised for this analysis to calculate the hazard ratio and CI to evaluate the potency of the effect found. Model fit and performance was assessed using standard techniques, including goodness-of-fit tests and the proportional hazards assumption evaluation.

Finally, the ATE was calculated from the matched data. IPW was applied to adjust for confounding by weighting individuals based on their estimated propensity scores for the whole cohort, and sensitivity analyses based on age and macrolide concomitant use. Outcome definitions, including short-term and longer-term mortality, were specified and measured uniformly across both groups. We ensured an adequate follow-up period, with mortality outcomes assessed at 28-, 90- and 365-days post-admission. A p-value of less than 0.05 was considered statistically significant. All analyses were performed using R Studio 2024.04.2 and STATA version 1645.