BRMS negative gamma prior

Hey,
I want to place a gamma prior on something that varies from -Inf to 0 in brms. I am not sure how or whether that’s possible. To clarify, I want a distribution that is basically the mirror of gamma distribution that is defined from 0 to Inf. So instead of gamma(0.01, 0.01) I want -gamma(0.01, 0.01). Is that possible?

You can set a gamma prior on -x where x is the quantity that varies from -Inf to 0. The specification of that in brms would likely be a little tedious, but first I want to make sure this is what you ment.

Yes, that what I want. Would it be a solution if I used make_stancode and add a - before the prior?

not in front of the prior. Basically replace

target += gamma_lpdf(par | …)

by

target += gamma_lpdf(-par | …)

I can’t tell if this prior is sensible in your case but this is at least how you write it down.

1 Like