# BF for planned comparisons in multi-factor designs

**25**

I have read Richard's two (excellent) blog posts regarding multiple comparisons in one-factor design with BayesFactor, and have found them to be very instructive and easy to understand.

I do have some questions regarding comparisons in multi-factor designs:

I generally understand how to compute posterior odds using the posterior() function, but I am at a loss about how to compute prior odds in these cases.

For example, if I have a 2-by-2 design, and my restricted model is that one simple effect is larger than the other simple effect, are the prior odds 0.5 because in the unrestricted model, either simple effect can be larger than the other?

What about if (in the same design), my restricted model is that there are two simple effects, **and** that one of them is larger than the other? I have no idea how to compute the prior odds in this case...

(Also, which BF would I have to divide by to get the restricted vs. **null** BF in each of these cases?)

Similarly, when computing a BF for a restricted correlation, I understand that if my restricted model is that r>0, my prior odds are 0.5, but what if my restricted model is that r>0.3?

I have some more queries along these lines, but I'll take it one step at a time

Thanks!

M

## Comments

392Hi M,

It all depends on the priors. Basically, you can obtain the prior odds by sampling from the prior distributions; sometimes you don't have to, and you can obtain the desired odds analytically. Also, the prior you set

maybe guided by your test; but again, it all flows from the prior distribution.For instance, if you test a restricted correlation (I assume you mean a test for rho > x versus rho < x) you might first postulate an encompassing prior without any restrictions, say rho ~ uniform[-1,1]. The prior odds then flow naturally from the way you carve up that uniform.

Basically you sample from the encompassing prior and then compare the proportion of samples consistent with the restriction to its complement.

Cheers,

E.J.

25Thanks @EJ (and @richarddmorey , with whom I had a short back and forth with via email)!