Brms default prior for class=sd in multilevel regression


I’m a little confused about the brms default priors in a multilevel regression. When I use prior_summary, I understand all priors that were used except for those with class=sd. There is one kind of priors with class=sd for the random effects, I assume, where the groups are specified. What does it mean when the prior column is empty? An improper flat prior? I thought these should be half student-t distributions as a default?

Second, there is a kind of class=sd prior where no group is specified and I don’t understand what it does, since I can’t find a description here: The default prior for this one is the half student t.

Could someone please clarify what these priors are for and what the blank fields mean?


Anyone please? I’m really stuck with this.

The prior specification in brms is hierarchical. If the row with only class (= sd) has a specified prior it is going to be applied to all sds (to all other rows with class = sd if you will). Similarily, if you specify not only class but also group the specified prior will only apply to all SDs of the specific group. Of course, you can also set a prior on the SD of the specific coefficient in a specific group directly.
See ?set_prior for more details. Hope that helps.

1 Like

Thanks. So both the priors for class=id only and class=id with specified groups are for the random effects (i.e., the two are identical?). I’m confused because they are both listed when I look at the prior summary. And the default is the half student t for all random effects (including for intercepts) even though these are only listed in the summary for class=id with specified groups while the prior column for class=sd only is empty?

The are for the same class, but one (the one with specified group) only applies to a specific grouping factor. If you just have one grouping factor in your model then the imply the same of course.

In some models, the global class either does not exist or is empty as the default prior must be different across instances, for instance different across response varibables. In this case, the default priors are specified on a lower level.

1 Like

Thank you. That helps a lot!