Odds ratios in a posterior parameter plot

103 views
Skip to first unread message

Paul Lantos

unread,
Aug 30, 2017, 2:22:48 PM8/30/17
to brms-users
Hey Paul,
 I've used the mcmc_intervals function in bayesplot to generate this figure. I'm trying to present the x axis in the most comprehensible way to my readers.

I think it's an effective graphic, but I'm not entirely clear on the units of the x axis. I am assuming it is logit scale, and it is change in log odds for each change in my parameters.

Is this something I can change into something more comprehensible to non-statistician readers, like an odds ratio?

Auto Generated Inline Image 1

Paul Buerkner

unread,
Aug 30, 2017, 2:25:49 PM8/30/17
to Paul Lantos, brms-users
I don't know exactly what kind of model you fitted, but I assume it is a binomial model, right?

You could try exponentiating the posterior samples of the coefficients to arrive at odds ratio changes and then pass the exponentiated samples to mcmc_interval.

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.
To post to this group, send email to brms-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/a48dec89-af35-4f83-ba28-c0fc8ab9493a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Lantos

unread,
Aug 30, 2017, 2:43:12 PM8/30/17
to brms-users, paul....@gmail.com
Right, its a binomial model.

So if this is model$fit could I just do exp(param - mean(param)) for each column?



On Wednesday, August 30, 2017 at 2:25:49 PM UTC-4, Paul Buerkner wrote:
I don't know exactly what kind of model you fitted, but I assume it is a binomial model, right?

You could try exponentiating the posterior samples of the coefficients to arrive at odds ratio changes and then pass the exponentiated samples to mcmc_interval.
2017-08-30 20:22 GMT+02:00 Paul Lantos <paul....@gmail.com>:
Hey Paul,
 I've used the mcmc_intervals function in bayesplot to generate this figure. I'm trying to present the x axis in the most comprehensible way to my readers.

I think it's an effective graphic, but I'm not entirely clear on the units of the x axis. I am assuming it is logit scale, and it is change in log odds for each change in my parameters.

Is this something I can change into something more comprehensible to non-statistician readers, like an odds ratio?

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+...@googlegroups.com.
Auto Generated Inline Image 1

Paul Buerkner

unread,
Aug 30, 2017, 2:49:26 PM8/30/17
to Paul Lantos, brms-users
Why do you want to subtract the mean?

Otherwise yes, you can just exponentiate the posterior samples.

To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.

To post to this group, send email to brms-...@googlegroups.com.

Paul Lantos

unread,
Aug 30, 2017, 2:51:59 PM8/30/17
to brms-users, paul....@gmail.com
Because that would make it an odds ratio rather than just odds, right?

Paul Buerkner

unread,
Aug 30, 2017, 3:05:24 PM8/30/17
to Paul Lantos, brms-users
Let me think about that. So lets say we have two predictors, one with coefficient 1 and one with coefficient 0 (logit-scale).

exp(param) would yield 2.7 and 1 in those two cases. Let's say both parameters have roughly the same distribution (just shifted by 1 in comparison).

However, exp(param - mean(param)) whould yield the same odds ratio for both coefficients, although the first clearly has a higher association with the response than the second. Does that makes sense?

To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.

To post to this group, send email to brms-...@googlegroups.com.

Paul Lantos

unread,
Aug 30, 2017, 3:14:05 PM8/30/17
to brms-users, paul....@gmail.com
I see, yeah that makes sense.

Well, I'm not opposed to keeping the chart in the original units (am I correct that it's logit scale and x represents change in log-odds per change in parameter?). I just want to make sure it's labeled correctly. Is my original label (see the first post) accurate enough as long as I specify in the caption that it's on the log odds scale?

Paul Buerkner

unread,
Aug 30, 2017, 3:28:49 PM8/30/17
to Paul Lantos, brms-users
It seems accurate to me, yes.

To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.

To post to this group, send email to brms-...@googlegroups.com.

Paul Lantos

unread,
Aug 30, 2017, 3:31:12 PM8/30/17
to brms-users, paul....@gmail.com
Thanks!
Reply all
Reply to author
Forward
0 new messages