In BRMS, if one specifies a QR decomposition AND wants to set informative priors, are the priors on the scale of the raw (i.e., not decomposed) coefficients? In other words if I set
formula = bf(y~x1+x2+x3 + x4, decomp="QR")
priors = set_prior("normal(0,5)", class = "b")
Is that prior relating the coefficients for x1, x2, x3, & x4? Or does it relate to the transformed set of coefficients after going through a QR decomposition.
Thank you!
For the proportional odds semiparametric model the rmsb
package has the user specify the priors in terms of a series of contrasts. All of the contrasts are then combined into one big contrast matrix, and this matrix is QR-transformed just like the raw data’s design matrix. So then the priors are on the right quantities. The code in the package’s blrm
function and the accompanying Stan code may give you ideas for how to do this yourself using Stan. I don’t think brms
has this implemented. The rmsb
Github page is GitHub - harrelfe/rmsb: Regression Modeling Strategies Bayesian .
This approach has the major advantage of making it easy to specify priors, as demonstrated in Regression Modeling Strategies – 2 General Aspects of Fitting Regression Models, for such things as the degree of interaction between two variables, an inter-quartile-range covariate effect, and the degree of linearity of a spline function in a user-specified interval. It also works well for simpler things such as a 3-group comparison where there is no information about group A, but a prior is put on the C-B difference.
2 Likes