-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<infection> accepts R as a distribution or samples #106
Comments
The goal of this is to allow uncertainty in some of the key epidemiological parameters into the model and outputs. It is likely better to start with samples from a distribution, as EpiNow2 is a more complex package to run. |
Agree simple distribution input good starting point (e.g. vector of samples? Then could downsample to a give number of replications for the model, e.g. vector of length X to 100 in model). Could also be nice opportunity to integrate with |
Have been exploring some options for implementation. Seems to me the key challenge is that we will need a wrapper to simulate multiple model outputs sampling from the distributional vector, and where is best place to put this wrapper. I see (at least) a couple of possibilities:
Advantage: the complexity will be hidden from user, who just needs to decide whether to input numeric or vector into the infection object, and package will handle the rest Disadvantage: will need to edit every epidemic model function to include these checks and wrapper, although would be scope to modularise in next way (e.g. function around
Advantage: existing models untouched so can be used directly, with Disadvantage: bit clunkier for user, as they'll need to decide whether or not to use My initial preference would be (2), but keen to hear if have missed any obvious considerations. |
So this wrapper could be a good candidate for functionality that should be in {scenarios}? |
Yep, likely to be overlap, although I guess main use cases in scenarios for low dimensional possibilities (e.g. 5 different intervention parameter scenarios that can be compared, rather than 100 realisations of the sample parameter set with uncertainty). I'll have a dig around in scenarios to see if theres any functionality that could be used as a starting point – maybe In any case, would be handy for user to be able to stick a vector in the |
Yep, I think {scenarios} could handle parameter uncertainty as well as interventions options, but yes, could also stick this into the |
Great. I think we did decide that the parameter uncertainty should be handled by scenarios (or at least not in epidemics) so good to see convergent thinking on this |
Sketched out a vignette with EpiEstim, epiparameter and epidemics (with the final function very rough, and perhaps sitting better as a modified scenarios function): https://github.com/epiverse-trace/epidemics/blob/parameter-distributions/vignettes/parameter_uncertainty.Rmd Also made me realise that having some nicely integrated plotting functions would be helpful, as thinking through how to plot arrays (e.g. showing different trajectories while summing over different groups etc.) will become more cumbersome for users. |
Thanks a lot @adamkucharski - will take a look now and keep in mind that this could fit well in {scenarios} too. Regarding plotting, @joshwlambert is looking into the related issue #98, so a similar approach might work - will look into the possibilities. |
Superseded by #140 which removes the |
This issue is to request that$R_0$ estimates as a distribution or as samples. Further, this could be from exisiting packages such as {EpiNow2}.
<infection>
class objects should acceptThe text was updated successfully, but these errors were encountered: