Replace `{response_name}_mean` with `{response_name}_{parent_name}`.
Because of historical reasons, Bambi is always calling the parent of all families "mean". Given the flexibility we have now, e.g. distributional models for arbitrary likelihoods, I think it does not make sense to keep using "mean", and actually it can lead to confusion.
I think we can simply use the name of the parameter. For Normal likelihoods, it will be mu, for Bernoulli and Binomial it will be p, etc. etc.
I'm also starting to think it's a good chance to change the dimension name for the observation index.
Right now we use {response_name}_obs and it has two drawbacks:
- We have to build the name every time we want to use it
- The name can be something not easy to read such as
c(category 1, category 2, cat 3)_obsorp(y, n)_obsorcensored(x, value)_obs.
I think we can always use the same name. Something like obs_idx, _obs_idx, __idx, obs_index, etc.
There's more. What if we stop pre-pending the LHS of the formula to the name of the parameter? Right now it leads to something like p(y, n)_mean. If we use the name of the parameter it will be p(y, n)_p. What if we drop whatever we have on the RHS and start using parameter names? Simply mu, sigma, p, alpha, etc. etc.