0
$\begingroup$

I am using brms with family = bernoulli(). The coefficients, if I understand correctly, are in log odds. Here is a piece of the output of the population-level effects:

Population-Level Effects: 
                Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept         1.27      0.45     0.41     2.16 1.00      584     1192
varB              0.33      0.62    -0.85     1.52 1.01      674     1362
varC             -1.57      0.61    -2.85    -0.38 1.00      613     1000

For what I know, if I want to report the probabilities of getting the correct answer at variable A (the intercept), then use this formula:

exp(1.27)/(1+exp(1.27))

That gives me 0.7807427, or 78% or probabilities of getting the response correct after one day.

If I want the probability of getting it correct at VarB:

exp(1.27+0.33)/(1+exp(1.27+0.33))

Which is 83%. However, the CIs include 0, so there is no effect. If I want to report the CIs of VarB, if I use the same formula

exp(0.41 - 0.85) / (1 + exp(0.41 - 0.85)) #for lower CI
exp(2.16 - 1.52) / (1 + exp(2.16 - 1.52)) #for upper CI

I get two positive numbers, which I should not because it looks like there is an effect when actually is not!

I think this is another way of doing it:

samples <- posterior_samples(model, pars = "Intercept")
quantile(samples$b_varB, probs = c(0.025, 0.975))

But again, I get a number that I think it's in log odds.

So, the question is: can I leave the coefficient as a probability and the CIs as log odss?

$\endgroup$
  • $\begingroup$ You should calculate the quantiles for the sum of intercept + varB and transform those. $\endgroup$ – HStamper Nov 26 '19 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.