Is there an inconsistency or limited application in the brms model priors and other functions??
When defining priors, it is technically allowed to truncate the priors of a model parameter class, e.g. like this
prior <- c(prior(student_t(1, 0, 1), class = b, lb=-4, ub=4))
but also to specify priors for single coefficients in a model:
prior <- c(prior(student_t(1, 0, 1), class = b, coef=IndepVariable))
What is not allowed (as indicated by an error message) is this:
prior <- c(prior(student_t(1, 0, 1.5), class = b, coef=IndepVariable, lb=-4, ub=4))
Or maybe I should ask: Is it possible to change this in future versions? :)
Here are some reasons for why I think this needs to be possible:
Defining the priors for every parameter properly seems to be a prerequisite of some other functions like hypothesis() or nlf(). And it seems to me, that some hypotheses tests (e.g. hypothesis(model, “IndepVariable==0”) cannot be done with truncated priors because of the coding restriction.
in logistic models it is, in some cases, almost meaningless to have samples smaller than -5 or larger than 5 because they are parameters on a log scale. This might be moreover parameter specific in more complex models (e.g. a large +intercept basically excludes large additional effects like +5 on a log-scale).
Negative values of some -specific- parameters in regressions are a priori meaningless (e.g. of ‘growth rate’ ), but still normally distributed (that is, one can not use gamma distributions), and currently it seems not possible to specify such a priori assumptions without willingly miss-specifying the model.
I currently run a model with such priors, just to see what happens…
prior <- c(prior(student_t(1, 0, 1.5), class = b, lb=-4, ub=4), prior(student_t(1, 0, 1.5), class = b, coef=IndepVariable))
Intuitively I guess this will not lead to a truncated prior for IndepVariable