You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, brms stores all prior log densities in lprior variable. This is fine as the default behavior and makes it easy to use priorsense for quick tests without increasing the memory usage too much. To be able to focus on specific priors, we could allow priors to be tagged with labels.
For example, using a modified version of the example from set_prior doc
make_stancode(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = cumulative(),
prior = c(prior(normal(0,10), class = "b", lprior = "b"),
prior(normal(1,2), class = "b", coef = "treat", lprior = "treat"),
prior(cauchy(0,2), class = "sd", group = "subject", coef = "Intercept"))
This would store the corresponding priors in variables lprior_b and lprior_treat. The same tag could be used for several priors, in which case the log density contributions from those priors would be summed together.
In the separate_scaling branch of priorsense I have implemented the selection of priors and likelihood contributions in the case that lprior and log_lik are arrays. Currently the user needs to keep track of which element of the array corresponds to which prior, but perhaps the mapping can be stored.
Currently,
brms
stores all prior log densities inlprior
variable. This is fine as the default behavior and makes it easy to usepriorsense
for quick tests without increasing the memory usage too much. To be able to focus on specific priors, we could allow priors to be tagged with labels.For example, using a modified version of the example from
set_prior
docThis would store the corresponding priors in variables
lprior_b
andlprior_treat
. The same tag could be used for several priors, in which case the log density contributions from those priors would be summed together.ping @n-kall
The text was updated successfully, but these errors were encountered: