CDCgov / ww-inference-model

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
https://cdcgov.github.io/ww-inference-model/
Apache License 2.0
17 stars 2 forks source link

`compute_likelihood` flag returned by `get_mcmc_options` is ignored #112

Closed dylanhmorris closed 2 months ago

dylanhmorris commented 3 months ago

It is settable:

https://github.com/CDCgov/ww-inference-model/blob/410857b4634d31df7585060082d9c2dc539b7bbf/R/wwinference.R#L245-L274

But wwinference() ignores it and sets compute_likelihood = 1

https://github.com/CDCgov/ww-inference-model/blob/410857b4634d31df7585060082d9c2dc539b7bbf/R/wwinference.R#L106-L118

I would advocate moving the flag out of get_mcmc_options() (since everything else there is passed directly as a keyword argument to model$sample(). I would think the place it would belong if settable is in get_model_spec() (alongside the include_ww flag.