Correction to: Nature Medicine https://doi.org/10.1038/s41591-023-02219-5. Published online 18 January 2023.

In the version of the article initially published, there was a typographical error in the force of infection (FOI) formula under the second paragraph of the “Statistical Methods” section, originally reading \(\lambda \left(t\right)=\gamma \times f(a)\times {VL}(t)\times {{VE}}_{v,n\left(t\right)}\left(t-{T}_{n\left(t\right)}\right)\). The formula has been corrected to read \(\lambda \left(t\right)=\gamma \times f(a)\times {VL}(t)\times \left(1-{{VE}}_{v,n\left(t\right)}\left(t-{T}_{n\left(t\right)}\right)\right)\) in the HTML and PDF versions of the article. The results of the article were not affected by this error.