Priors and scale adjustments for regression coefficients


I am trying to understand how the scale of priors for regression coefficients is adjusted on rstanarm. I read, however, I can’t find the same scale adjustment when I used the formula explained in “regression coefficients”.

I tried to calculate the scale adjustment of a Cauchy(0, 2.5) with a sd(y)=24.38 in context of a categorical variable (x) with four levels, using a poisson error.

The formula is 2.5*s(y)/s(x) with s(y)=1 as it is a non-gaussian family and s(x)=1 as it is a categorical variable. Did I miss understand something here?

So I should have a scale of 2.5, however, stan_glm gave me approximately 5.4 for each level.

I probably just miss understood a small thing with the formula.
Thank you in advance for your help,


Hi @Theo, good question and sorry nobody responded sooner! Is your x variable coded using R’s “factor” type? Even better, is it possible to share the data (can be fake if necessary) and code so I can reproduce this and make sure it’s working as intended?