Possibly related to this thread, each time I try to use the bridge sampler via bayes_factor()
in brms (2.17.0), R Studio crashes. As far as I’m aware, I have the latest (development) versions of rstan and StanHeaders (2.26.13), and am running R 4.2.1 through RStudio 2022.07.1+554 on a Windows machine. The models I am trying to compare are simple:
firstPrior <- set_prior("normal(0, 1)", class = "b")
first <- brm(amplitudeD ~ group, data=data, family=gaussian(),
prior=firstPrior, save_pars=save_pars("all"), sample_prior=TRUE)
secondModel <- bf(amplitudeD ~ group, sigma ~ group)
secondPrior <- set_prior("normal(0, 1)", class = "b")
second <- brm(secondModel, data=data, family=gaussian(),
prior=secondPrior, save_pars=save_pars("all"),
sample_prior=TRUE)
bayes_factor(first, second)
The data are also simple:
data.csv (2.3 KB)
If anyone has any ideas regarding how to solve this issue, I’d appreciate it. (I’ve never had any problems using bridgesampling before, though have not tried for some months previously, so suspect the version of something I’m using now is to blame.)