Orthonormal contrasts for Bayes Factor estimation

Hi everyone,

I’m trying to estimate Bayes Factors for a coefficient in a logistic regression model with two categorical fixed effects with 3 and 5 levels.

I read some info about needing to specify orthonormal contrasts (here: Chapter 6 Contrast coding | Introduction to Bayesian Data Analysis for Cognitive Science ):

If one is trying to set a general prior for differences between means, then the function bayestestR::contr.equalprior() can be used. The bayestestR::contr.equalprior() function can be used when one aims to set equal marginal priors for differences between means across all levels of a factor. This avoids the unequal prior distributions that can result from other contrast methods (e.g., stats::contr.treatment()) and supports correct Bayes factor estimation in multi-level factors. It is particularly useful for factors with more than two levels, following the orthogonal-normal contrasts described in Rouder et al. (2012, 363). For more information, see https://easystats.github.io/bayestestR/reference/contr.equalprior.html.↩︎

I’m wondering if this only holds true when using the BayesFactor package as I found in a preprint by Schad et al. ( [2203.02361] Data aggregation can lead to biased inferences in Bayesian linear mixed models and Bayesian ANOVA: A simulation study ):

An important difference of the BayesFactor package to the brms models discussed above is that it assumes sphericity for all contrasts coding one factor, i.e., it assumes that all these contrasts share the same (prior) standard deviation. (p. 28)

When calculating Bayes Factors via the hypothesis() function in brms, there’s a message saying Posterior probabilities of point hypotheses assume equal prior probabilities.

Does this dependent on whether the Savage-Dickey method or bridge sampling ist used?

More generally: Is there another (better?) way to describe the difference between to conditions/levels of a factor than using the coefficients? Maybe using something like posterior_epredor the margininaleffectspackage to get the average population-level outocmes (described here Marginal and conditional effects for GLMMs with {marginaleffects} | Andrew Heiss – Andrew Heiss )? Currently, my plan would be to report the median and 95% HDI of the posterior distribution of each condition and the difference to the baseline condition (preferably on the probability scale) as well as a Probability of Direction, %inROPE and BayesFactor for the effect/difference.

Thanks,

Alex