In parametric approach, serial interval is typically assumed to have Gamma distribution, so it would be perhaps useful to include a function
r2R0gamma <- function(r, si_mean, si_sd) {
(1+r*si_sd^2/si_mean)^(mu^2/sigma^2)
}
in the package. Even the example of r2R0 is not really fortunate as it starts from mu and sigma being known, yet, it first transforms them to a discretized distribution, and then uses the empirical distribution formula from Wallinga and Lipitsch, which is obviously a convoluted approach, with a loss of precision.
As a comparison, r2R0 gives the values
[1] 0.0000000 0.9852657 1.0000000 1.0148667 98.7061545
for the example, while the true values according to my calculation are
[1] NaN 0.9847737 1.0000000 1.0153739 168.8621648
In parametric approach, serial interval is typically assumed to have Gamma distribution, so it would be perhaps useful to include a function
in the package. Even the example of
r2R0is not really fortunate as it starts frommuandsigmabeing known, yet, it first transforms them to a discretized distribution, and then uses the empirical distribution formula from Wallinga and Lipitsch, which is obviously a convoluted approach, with a loss of precision.As a comparison,
r2R0gives the valuesfor the example, while the true values according to my calculation are