Formula: for the standard SIR model the final size Z = S(0) - S(inf) satisfies the implicit relation
(Ma & Earn 2006, eq. 4, p.681), which in the limit I(0) -> 0, S(0) -> 1 collapses to the classical Z = 1 - exp(-R0 Z) (their eq. 5). Ma & Earn show the relation holds for arbitrary distributions of the infectious period, so R0 alone determines the final size. The root is isolated by bisection on [0, S(0)], where the residual is non-negative at 0 and strictly negative at S(0).
References
Kermack & McKendrick (1927), Proc. R. Soc. Lond. A 115(772):700-721, doi:10.1098/rspa.1927.0118; Ma & Earn (2006), Bull. Math. Biol. 68(3):679-702, doi:10.1007/s11538-005-9047-7.
Examples
Finalsz(R0 = 5L)
#> $estimate
#> [1] 0.9930228
#>
#> $final_size
#> [1] 0.9930228
#>
#> $s_inf
#> [1] 0.006977154
#>
#> $attack_rate
#> [1] 0.9930228
#>
#> $R0
#> [1] 5
#>
#> $s0
#> [1] 1
#>
#> $i0
#> [1] 0
#>
#> $residual
#> [1] 1.221245e-15
#>
#> $iters
#> [1] 47
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "Final epidemic size (Kermack-McKendrick)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
