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 thoughts on “Computing marginal likelihoods in Stan, from Quentin Gronau and E. J. Wagenmakers

    • (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.”)

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

Leave a Reply

Your email address will not be published. Required fields are marked *