Skip to content

Avoiding unnecessary discretization in r2R0 #26

Description

@ferenci-tamas

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions