Closed athowes closed 3 weeks ago
Possible solution:
replace_prior
which doesn't care if you try to replace things that don't exist and use that for internal replacements.Downside: maybe it's harder for us to be debugging if any replacements are going wrong.
just have an optional arg that you set when its time to replace user priors I think
As a part of this issue, we might like to also alter the structure of our priors so that epidist_family_prior.lognormal
doesn't need as much general code in it.
https://github.com/epinowcast/epidist/pull/282#discussion_r1753960842 (and comment thread):
One plan here:
replace_prior
to do a warning rather than error when there is no prior to replaceepidist_prior
and remove the lower level parts about removing priors on constantsThe flaws in this plan:
replace_prior
to just do a warning then we don't need the utility function to remove priors on constant parameters sincedefault_prior
already won't have put a prior on a constant in there, so there will be nothing to replace, hence we just end up with a warning