Specifying the variance of the random effect means for brms model

I have been using brms to make a mixed-effects model, that tries to calculate the hospital random effect intercepts, to determine the effect of each hospital on the mortality of patients.
The variable Risk Adjustment just represents the predicted percentage mortality of the patients obtained from a previous model.

brms_glmer <- brm(Mortality ~ offset(RiskAdjustment) + (1|Hospital), data = HLM_data,
                          family = bernoulli (link = "logit"),
                          cores = 16,
                          chains = 4,
                          iter = 2000,
                          seed = 1234
)

My question: is there anyway to specify the variance of the means of the hospital intercepts? Or some way to increase the variance of the hospital mean intercepts generated by the model (to get a wider distribution).

Thanks for your help in advance!

Welcome to the Stan forums. Sorry nobody responded sooner.

If I understand correctly it sounds like you want to change the prior distribution on the standard deviation of intercepts that vary by hospital to make it wider.

I think doing

get_prior(
  Mortality ~ offset(RiskAdjustment) + (1 | Hospital),
  data = HLM_data,
  family = bernoulli(link = "logit")
)

will show you the default that’s being used by brms and based on that you can then specify your own prior that increases the standard deviation above whatever the default is.

For example, suppose you end up deciding you want to use a t-distribution with degrees of freedom = x, location = y, and scale = z (for whatever numbers x,y,z that make sense in your case). You could do:

custom_prior <- prior(
  student_t(x, y, z), 
  class = "sd", 
  group = "Hospital"
)

and then pass this custom_prior object to the prior argument of the brm() function when you fit the model.