epiverse-trace / epiparameter

R package with library of epidemiological parameters for infectious diseases and functions and classes for working with parameters
https://epiverse-trace.github.io/epiparameter
Other
33 stars 11 forks source link

Move dispersion from parameter to summary statistic in DB and add dispersion to `create_summary_stats()` #379

Closed joshwlambert closed 1 month ago

joshwlambert commented 2 months ago

This PR redefines the dispersion parameter as a summary statistic for probability distributions that do not use the dispersion parameter in usual parameterisations (e.g lognormal distributions). It is kept as a parameter for distributions that use dispersion as a standard parameter (e.g. negative binomial). This change is made to the parameter database (parameters.json).

The JSON schema (data_dictionary.json) is enhanced by adding a propertyName enum to make sure that summary statistics stored in the database are valid from a set of options.

The create_summary_stats() function is updated to include dispersion and dispersion uncertainty as arguments and in the output list. The function documentation is also updated.

joshwlambert commented 1 month ago

Merging this PR even though one of the unit tests is failing as this will be fixed in an upcoming PR.

Other GHA workflows have also failed since rebasing this branch but this is due to an issue with the workflow and independent of any changes made in this PR.