epiverse-trace / episoap

[Not published - under active development] A Store of Outbreak Analytics Pipelines Provided as Rmarkdown Report Templates
https://epiverse-trace.github.io/episoap/
Other
4 stars 2 forks source link

Allowing flexibility for probability distributions in transmissibility template #108

Closed CarmenTamayo closed 7 months ago

CarmenTamayo commented 7 months ago

Currently, the transmissibility report template specifies a gamma distribution for the serial interval, as it is indicated on the introduction: "Here, we assume that the mean and standard deviation of the $si$ is known, and provided as an input by the user. We model the $si$ distribution as a discretised Gamma" However, this might not be the case, and the user might have another distribution in mind. Further, this doesn't apply to parameters extracted from the {epiparameter} database, with their corresponding distributions.

At the moment, the only implication of this is on lines 395-396, where the distribution is specified when extracting the distribution parameters from summary statistics.

The potential solutions that I envision for this are:

a) We assume a gamma distribution for every case when the mean and sd are provided by the user (ie when not using {epiparameter}), so the only change that needs to be made is rewriting the intro to specify this. b) We let the users specify the distribution, and add this to the list of parameters of the .Rmd, with gamma as a default, in which case the code would have to be updated to reflect this change when extracting parameters.

@Bisaloo

Bisaloo commented 7 months ago

It's already in the list of parameters: https://github.com/epiverse-trace/episoap/blob/4fa29627c131d395182a07e2c6659871d4bca810/inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd#L31-L34

So as far as I can tell, we just need to ensure this params$si_dist is used when we convert the parameters and that the explication text is updated.

CarmenTamayo commented 7 months ago

That's true, sorry Hugo I was thinking of the past usage of epitrix, but now with epiparameter it's possible to just indicate the name of the distribution in this way- I'll update the code and the text as well to reflect this and explain to the users