An in-development R package and a Bayesian hierarchical model jointly fitting multiple "local" wastewater data streams and "global" case count data to produce nowcasts and forecasts of both observations
This PR does two things, one which is necessary another which may be up for discussion but does appear to be necessary if we are passing in long pmfs through a config...
Adds a test so that we catch something like this next time
The up for debate thing is that:
Adjusting the tolerance. I loaded from the package data and passed to the config and I think passing things around leads to rounding error, so the long infection to hospital admissions delay has a difference of just above 1e-7. I think we should be a bit more flexible with this given we are setting this up for people to pass in delays via a config.
Open to other suggestions e.g. for the pipeline we could one off load the rda from the wwinference package, use the package default, or compute directly but in general I think we want the wwinference package to allow users to specify via a config a long delay so tolerance can be a bit higher IMO.
This PR does two things, one which is necessary another which may be up for discussion but does appear to be necessary if we are passing in long pmfs through a config...
validate_pmf()
function.all.equal()
needs to be wrapped inisTRUE()
because it returns either TRUE or a character with difference (alternatively we could use that error message here, but I like our custom one). https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/all.equalThe up for debate thing is that:
Open to other suggestions e.g. for the pipeline we could one off load the rda from the
wwinference
package, use the package default, or compute directly but in general I think we want thewwinference
package to allow users to specify via a config a long delay so tolerance can be a bit higher IMO.