Correction to: Nature Medicine https://doi.org/10.1038/s41591-024-03264-4, published online 1 September 2024.

In the version of the article initially published, the first three columns of the “New-onset atrial fibrillation” row of Fig. 1 originally read “286 (3.0)”, “1.3”, “345 (3.6)” and have now been amended to “286 (3.9)”, “1.4”, “345 (4.7)” in the HTML and PDF versions of the article.