Skip to content
 

Computing marginal likelihoods in Stan, from Quentin Gronau and E. J. Wagenmakers

Gronau and Wagemakers write:

The bridgesampling package facilitates the computation of the marginal likelihood for a wide range of different statistical models. For models implemented in Stan (such that the constants are retained), executing the code bridge_sampler(stanfit) automatically produces an estimate of the marginal likelihood.

Full story is at the link.

5 Comments

  1. Dan Simpson says:

    Yes but why should it?

    • Dan Simpson says:

      (My standard advice to people is “If you’re name is Jim Berger or you self identify as an expert in Bayes factors, then by all means use them. Otherwise they’re really really hard to do well.”)

      • Michael says:

        What about forensic likelihood ratios? I think that’s a very legtimate use of bayes factors, and this package could be very useful there.

        • Dan Simpson says:

          As I said, if you self-identify as an expert in BFs then use them. But you need to understand just about everything about your model (and particularly your prior), to know which parts of your model the BF will be sensitive to, and have iron clad justifications of those parts of the model. This is not really a “entry level” tool. Without those things, BFs are too easy to game.

  2. Ben Goodrich says:

    I would have said the same thing before the bridgesampling package was introduced. It makes calculating these things easy and come with error estimates.

Leave a Reply