Odds ratio interval plot using stanplot( type = "intervals" )

I would like to do an interval plot of the posterior distribution of a bernoulli brm model but plot the x axis in odds ratio. Is the best way to do this to create a stanplot object and then transform the stanplot$data values?

Alternatively, should I leave the plot alone and just re-label the axis?

I just had this same question again and it seems I hadn’t gotten a reply. I want to plot the posterior intervals, but exponentiate them first. Is there a way to add a transformation to stanplot?

Please excuse me missing that question. I would recommend to first extract the parameters, transform them and then use the bayesplot functions underlying the stanplot()

No prob,

I actually figured out an easy solution - you can do stanplot( fit , type=“intervals” , trans=“exp” )

The trick is that the transformation changes the name of the plotted parameters from eg b_cov1 to exp(b_cov1), so if you’re renaming them using scale_discrete_y you need to rename the parameters accordingly.


That would be something to implement in bayesflow I guess.

Bayesplot I mean.

Ah I see it already working. That’s great!