Hi everyone,

I want to calculate the Bayes factor to do some hypothesis testing for the models that I am fitting using Stan. But based on this post, calculating Bayes factor directly using rstan seems to be not a straight forward thing.

Also I have seen several posts regarding calculating the Bayes factor using some packages like `brms`

, `rstanarm`

which directly use Stan.

So will it be possible to find the Bayes factor directly using Stan?

Because I may need to rely on Stan directly to fit models rather than using some built in packages.

Any suggestion will be highly helpful. Thank you.