Open athowes opened 3 months ago
There are no model priors in here. Add functionality for latent parameter priors at some point?
_Originally posted by @athowes in https://github.com/epinowcast/epidist/pull/183#discussion_r1691552579_
(This is challenging because it requires changes to the Stan code)
After the updates to prior interface we now have model-specific priors stored in epidist_model_prior.default
.
We need to be careful because changes to these priors will require editing the Stan code, which is created as follows (after the priors):
epidist_prior <- epidist_prior(
data = data, family = epidist_family, formula = formula
)
epidist_stancode <- epidist_stancode(data = data, family = epidist_family)
As well, we probably can't do Reduce
with replace_prior
when the prior is in Stan code. Unless we make it so that these priors are specified as brms
priors and then in the Stan code part (or at least somewhere before the model) we remove them and make the Stan code out of them. That might be a big ask.
The model has some parameters which are not
brms
defaults. These parameters are introduced byepidist_stancode
. Currently, users do not have an easy way to modify these priors.We could add some way for users to do so. Likely, this would be within the
epidist_prior
function.See my comment on #78 suggesting:
Doing this would reopen for me the argument that custom Stan code for model components should be grouped together with the other parts. (For example the family Stan code should be with
epidist_family
).