Inf Bayes factor using brms

Hi all,

I am comparing different models with bayes_factor from the package brms and have some issues for interpretation.

If I compare the same model but one with Gaussian, and one with Student distribution

fit1 <- brm(formula = bf(VARIABLE ~ CONDITION + AGE + (1|ID)), save_all_pars = TRUE,
data = myDataFrame)
fit2 <- brm(formula = bf(VARIABLE ~ CONDITION + AGE + (1|ID)), save_all_pars = TRUE,
data = myDataFrame, family = student())

Or if I compare one linear with one polynomial model

fit1 <- brm(formula = bf(VARIABLE ~ CONDITION + AGE + (1|ID)), save_all_pars = TRUE,
data = myDataFrame)
fit3 <- brm(formula = bf(VARIABLE ~ CONDITION + poly(AGE,2) + (1|ID)), save_all_pars = TRUE,
data = myDataFrame)

I get bayes_factor = “0” or “inf” depending on which model I put first. How should I interpret that? Does it mean that R can not compute or that one of the model is extremely better ?

Am I doing something wrong here?

Thank you in advance!
Marie

Bayes factors depend critically on the prior distributions and you seem to have used the default ones. For regression coefficients, the default priors are improper flat and thus not (reasoanbly) usable with brms. For a discussion of bayes factors in brms, see https://rpubs.com/lindeloev/bayes_factors

If you have not so much experience with Bayesian statistics, using Bayes factors correctly is very hard. May may also try loo(), which does approximation leave-one-out cross-validation.

Thank you! I’ll have a read into that.