Hey all,
I don’t use brms often, so maybe this is a silly question, however I it is also a simple one and I cannot seem to find the answer.
I want to fit a random effects model using brms, I want to set an inverse gamma prior not on the standard deviation of the random effects but on the variances.
Is there any way to do so in brms?

my current code, which sets the prior on the standard deviations, looks like this

res = brm(formula = as.formula("V1 ~ 0 + (1 || V2)"),
data = data,
prior = c(set_prior("inv_gamma(1,1)" , class = "sd"),
set_prior("inv_gamma(1,1)", class = 'sigma')),
iter =1000)

It’s possible to hack this via stanvars (i.e. pass a flat prior on the sd, and then use stanvars to pass the prior statement including the Jacobian adjustment).

But first, I just want to make sure that you’re aware that Stan will not recognize or exploit conjugacy, and there’s absolutely no computational advantage to this particular choice of prior. So the only reason to do this would be if you have specific prior knowledge that is best represented by an inverse gamma, or if you need to re-implement a specific model from somewhere else, including the priors.