Question about the inner working of bayes_factor()

51 views
Skip to first unread message

David Sidhu

unread,
Mar 9, 2018, 7:47:25 PM3/9/18
to brms-users
I have a couple of questions about the working of bayes_factor().

The documentation says that the comparison is based on the marginal likelihood. I was under the impression that the marginal likelihood was the denominator in Bayes' theorem, (see below, from Wagenmakers et al., 2010), which would mean BF01 is equal to p(D)/p(D)? However, elsewhere, Wagenmaker's use marginal likelihood to refer to a ratio between what I had thought of as the likelihoods (i.e., p(D|M1)/p(D|M2)). What exactly is being compared with bayes_factor()? I'm assuming the latter? Is there a reason for this different terminology?

This aside, Wagenmaker's seem to suggest two ways of computing Bayes Factor–via the Savage-Dickey Density Ratio–that a given parameter is not zero. One option is to compare the posterior likelihood and prior likelihoods of M2 at theta = 0. If I'm right, the other option is to compare M2 (in which the parameter is allowed to vary) with M1 (in which the parameter is fixed at a certain value)? In this case, is it p(D|M) for each model that is being compared?

Now, what I'm wondering is what happens when I used bayes_factor() to compare a model (M2) that contains a parameter of interest and another model (M1) that doesn't contain the parameter of interest. This seems different than the previously mentioned case from Wagenmaker's, in which the parameter is FIXED in M1 (as opposed to left out altogether). When it is left out, it would seem to me that there is no prior nor posterior distribution associated with the parameter, so what exactly is there to be compared with M2?

Thank you so very much for the help.

David Sidhu

unread,
Mar 9, 2018, 7:51:20 PM3/9/18
to brms-users
(This is what the "see below" refers to.)

David Sidhu

unread,
Mar 9, 2018, 8:06:27 PM3/9/18
to brms-users
I also wonder if the answer might shed some light on something strange. I have cases like this, in which the posterior for the full model has very little weight at theta = 0.


Yet bayes_factor() gives a whopping value of 67. Is this because of how narrow the distribution is? Though I thought that what was being compared was just the density at 0? (The parameter has a prior of cauchy(0, 2.5).)


Paul Buerkner

unread,
Mar 10, 2018, 2:15:45 AM3/10/18
to David Sidhu, brms-users
bayes_factor() computes the BF directly via bridgesampling (linked in the doc) and hypothesis computes it with the savage-dickey ratio.

**If** you have specfied the same prior and *did not* use not well behaving priors (cauchy is an example), then both methods will give similar results (up to sampling error).

For a cauchy prior, the hypothesis method has problem, because sampling from a cauchy prior is difficult. I recommend the bayes_factor() method in general, but in particular in this case.

--
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/4926c6f6-edd7-42bb-ad91-a4b679175a92%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Paul Buerkner

unread,
Mar 13, 2018, 11:00:15 AM3/13/18
to David Sidhu, brms-users
Yes. That's how Bayes factors work. This is not as Lindley's paradox.

2018-03-12 1:30 GMT+01:00 David Sidhu <dms...@gmail.com>:
Is it strange to get such a large Bayes Factor for the null in the case of the above image?

Actually, when I try replacing cauchy(0, 2.5) with a more diffuse prior, I get more evidence for the null. Is that normal?


On Saturday, 10 March 2018 00:15:45 UTC-7, Paul Buerkner wrote:
bayes_factor() computes the BF directly via bridgesampling (linked in the doc) and hypothesis computes it with the savage-dickey ratio.

**If** you have specfied the same prior and *did not* use not well behaving priors (cauchy is an example), then both methods will give similar results (up to sampling error).

For a cauchy prior, the hypothesis method has problem, because sampling from a cauchy prior is difficult. I recommend the bayes_factor() method in general, but in particular in this case.
2018-03-10 2:06 GMT+01:00 David Sidhu <dms...@gmail.com>:
I also wonder if the answer might shed some light on something strange. I have cases like this, in which the posterior for the full model has very little weight at theta = 0.


Yet bayes_factor() gives a whopping value of 67. Is this because of how narrow the distribution is? Though I thought that what was being compared was just the density at 0? (The parameter has a prior of cauchy(0, 2.5).)


--
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.

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

--
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.
Reply all
Reply to author
Forward
0 new messages