I have a model with a matrix term of predictors: y ~ X + g1 + g2
, where the matrix X
is of size n x k
, and the k
predictors variable and numerous enough to make using a more explicit formula inconvenient. I would like to set up a hierarchy such that coefficients of the model corresponding to columns of X
would be N(0, \sigma^2), with \sigma either estimated or fixed. Is this kind of priors possible to set in brms?
Writing this in pure Stan is relatively trivial, but again, using brms would allow easier experimentation.
Addition: set_prior()
seems to be good at least for setting fixed priors for all fixed effects simultaneously. That’s almost sufficient for my current purposes, for I can make all other effects random in my model. I don’t see a way to limit a prior only to fixed-effect terms derived from X
(which are many), except by listing all the terms…