Bayesian linear mixed-effects models and Bayesian ANOVA are increasingly being used in the cognitive sciences to perform null hypothesis tests, where a null hypothesis that an effect is zero is compared with an alternative hypothesis that the effect exists and is different from zero. While software tools for Bayes factor null hypothesis tests are easily accessible, how to specify the data and the model correctly is often not clear. In Bayesian approaches, many authors use data aggregation at the by-subject level and estimate Bayes factors on aggregated data. Here, we use simulation-based calibration for model inference applied to several example experimental designs to demonstrate that, as with frequentist analysis, such null hypothesis tests on aggregated data can be problematic in Bayesian analysis. Specifically, when random slope variances differ (i.e., violated sphericity assumption), Bayes factors are too conservative for contrasts where the variance is small and they are too liberal for contrasts where the variance is large. Running Bayesian ANOVA on aggregated data can - if the sphericity assumption is violated - likewise lead to biased Bayes factor results. Moreover, Bayes factors for by-subject aggregated data are biased (too liberal) when random item slope variance is present but ignored in the analysis. These problems can be circumvented or reduced by running Bayesian linear mixed-effects models on non-aggregated data such as on individual trials, and by explicitly modeling the full random effects structure. Reproducible code is available from \url{https://osf.io/mjf47/}.
翻译:贝叶斯线性混合效应模型和贝叶斯方差分析在认知科学中被越来越多地用于进行零假设检验,即比较效应为零的零假设与效应存在且不为零的备择假设。尽管贝叶斯因子零假设检验的软件工具易于获取,但如何正确指定数据和模型往往并不明确。在贝叶斯方法中,许多作者采用按被试层面的数据聚合,并对聚合数据进行贝叶斯因子估计。本文通过基于模拟的模型推断方法,将其应用于若干示例实验设计,证明与频率学派分析类似,在贝叶斯分析中对聚合数据进行此类零假设检验可能存在隐患。具体而言,当随机斜率方差存在差异(即违反球形假设)时,贝叶斯因子对方差较小的对比项过于保守,而对方差较大的对比项则过于宽松。若球形假设被违反,对聚合数据运行贝叶斯方差分析同样可能导致有偏的贝叶斯因子结果。此外,当存在随机项目斜率方差但分析中忽略该方差时,基于按被试聚合数据的贝叶斯因子会产生(过宽松的)有偏结果。这些问题可通过在非聚合数据(如单次试验数据)上运行贝叶斯线性混合效应模型,并显式建模完整的随机效应结构来规避或缓解。可复现代码见 \url{https://osf.io/mjf47/}。