You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
r2R0parametric <- function(r, dist, ...) {
if(!exists(paste0("mgf", dist), where = asNamespace("actuar")))
stop(paste0("There is no moment generating function for ", dist, " in actuar package!"))
1/do.call(get(paste0("mgf", dist), asNamespace("actuar")), list(t = -r, ...))
}
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
r2R0
is not really fortunate as it starts frommu
andsigma
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 valuesfor the example, while the true values according to my calculation are
The text was updated successfully, but these errors were encountered: