Abstract
INTRODUCTION: This study aims to empirically identify key predictors of antibiotic resistance at the individual level and to evaluate how the relationship between antibiotic use and resistance evolves as accumulated antibiotic-defined daily dose (DDD) levels exceed specific thresholds. To capture these non-linear dynamics, we apply a threshold regression framework. METHODS: A longitudinal population-based observational study using a comprehensive administrative dataset from Catalonia (2014-2021), focusing on 2 924 590 individuals born before 1965 under a universal healthcare system. Antibiotic resistance was identified using diagnostic codes and was observed among 17 466 individuals (0.6%) during the study period. Antibiotic exposure was defined as the number of dispensed systemic antibiotics (ATC J01) per DDD, calculated as the sum of cumulative consumption and the maximum use over six consecutive months. Machine learning techniques (logistic regression, decision trees, random forests and gradient-boosting, combined in a stacked ensemble) were employed to identify factors associated with antibiotic resistance, while accounting for sociodemographic characteristics, morbidity status, regional factors and antibiotic consumption. Model performance was evaluated using standard classification metrics. Threshold regression models, optimised using genetic algorithms, were applied to detect non-linearities in the relationship between cumulative antibiotic consumption and resistance. RESULTS: Machine learning models demonstrated good predictive performance (area under the curve 0.90, 95% CI 0.90 to 0.91; 0.83, 95% CI 0.82 to 0.83) in the stacked model. Antibiotic consumption emerged as one of the strongest predictors of resistance. Threshold regression revealed substantial heterogeneity in the association between accumulated antibiotic use and diminishing marginal effects beyond specific DDD thresholds, indicating that additional consumption at high levels was associated with smaller increases in resistance. CONCLUSIONS: These findings suggest that interventions targeting excessive antibiotic use, particularly below identified threshold levels, and tailored to specific sociodemographic and regional contexts, may be effective in mitigating antibiotic resistance. Accounting for non-linear consumption-resistance dynamics is essential for informing antibiotic stewardship policies.