Non-centered population-level intercept

I defined a model and I want to set a prior on the non-centered intercept. One way to do so in brms, which by default centers the intercept, is to use the formulation y ~ 0 + Intercept + .... This works fine.

I read in the manual that the same results could be obtained by setting bf(y ~ 1 + ..., center = FALSE). I noticed that this is true if only for the location parameter of the distribution. If we are also estimating the scale of the distribution with a similar formula, the intercept for this will be centered.

For example:


data = read.csv('') %>% 
  as_tibble(data) %>%
  mutate(Subject = factor(Subject))

bf <- bf(Reaction ~ Days + (Days | Subject), 
         sigma ~ Days + (Days | Subject), 
         center = FALSE)

get_prior(bf, data = data)           

will output (notice the class Intercept):

                   prior     class      coef   group resp  dpar nlpar bound
1                                b                                         
2                                b      Days                               
3                                b Intercept                               
4                 lkj(1)       cor                                         
5                              cor           Subject                       
6  student_t(3, 0, 59.3)        sd                                         
7                               sd           Subject                       
8                               sd      Days Subject                       
9                               sd Intercept Subject                       
10                               b                        sigma            
11                               b      Days              sigma            
12  student_t(3, 0, 2.5) Intercept                        sigma            
13 student_t(3, 0, 59.3)        sd                        sigma            
14                              sd           Subject      sigma            
15                              sd      Days Subject      sigma            
16                              sd Intercept Subject      sigma            

Is this the expected behavior?

  • Operating System: Win 10
  • brms Version: 2.13.13

It also seems that bf(..., decomp = "QR") works only for the location formula but not for the scale one.

Tagging @paul.buerkner.

Friendly post bump :) I am particularly interested in how to apply the QR decomposition to both mu and scale parameter.

Sorry, I have overlooked this post. If you want to avoid centering for sigma as well, or specify other arguments, you need to replace sigma ~ Days + (Days | Subject) by lf(sigma ~ Days + (Days | Subject), center = FALSE).

Now that I think of it, it may be more intuitive if the global center etc. arguments applied to all formulas, but I need to think more of that.


aha! I did not know about lf. Thanks! I think it is fine as it is—now that I know that the argument applies to the “main” formula only. Perhaps, in the future we could pass a list to bf(..., center=list(reaction=T, sigma=F)) or something like that. If only one argument is passed the transformation will apply to all parameters.