Fig. 1

Association between healthy lifestyle index score and atrial fibrillation risk. HR was adjusted for age, sex, education, PM2.5, greenness, diabetes, hypertension, dyslipidemia, myocardial infarction, heart failure, obstructive sleep apnea. The potential non-linear association was examined using restricted cubic spline regression (knots on the 5th, 25th, 75th, and 95th percentiles), with OR and 95% CI being calculated based on the Cox model. The restricted cubic spline regression was performed with the “rms” package. P for linear trend was 0.012, 0.045, 0.324 in all subjects, subjects aged ≤ 75 years, and subjects aged > 75 years, respectively; and P for non-linear trend was 0.752, 0.905, 0.611 in all subjects, subjects aged ≤ 75 years, and subjects aged > 75 years, respectively