心理技术与应用 ›› 2023, Vol. 11 ›› Issue (10): 577-598.

• •    下一篇

贝叶斯混合效应模型:基于brms的应用教程

  

  • 出版日期:2023-10-01 发布日期:2023-10-10

Bayesian Mixed-effects Models: A Primer with brms

  • Online:2023-10-01 Published:2023-10-10

摘要:

相比传统方法,贝叶斯混合效应模型在处理数据层级结构和提供更直观的统计结果等方面有独特优势,这使其逐渐流行于心理学研究之中。然而,国内尚缺少将贝叶斯混合效应模型应用于心理学研究的介绍。本文先概述贝叶斯混合效应模型的基本概念和原理,然后结合模拟数据展示了如何理解固定效应和随机效应,如何利用R语言的brms工具包设定和拟合贝叶斯混合效应模型,最后介绍如何借助先验预测检验自定义的先验分布是否合理,以及如何使用贝叶斯因子进行假设检验。凭借其强大的灵活性,贝叶斯混合效应模型可以适用于多样的心理学研究。

关键词: 贝叶斯, 混合效应模型, 分层模型, 贝叶斯因子, brms

Abstract:

Compared to the traditional statistical methods, Bayesian linear mixed-effects modeling (BLMM) has a great number of advantages in dealing with the hierarchical structures underlying datasets and providing more intuitive statistical results. These advantages together popularize BLMM in psychological and other field research. However, there is still a lack of tutorials on the practical applications of BLMM in psychology studies in Chinese. Therefore, we first briefly introduced the basic concepts and rationales of BLMM. Then we employed a simulated dataset to demonstrate how to understand fixed effects and random effects, and how to use the popular brms R package to specify models for BLMM based on the experimental design. We additionally covered the procedure of pre-specifying priors with prior predictive checks, and the steps of performing hypothesis testing using the Bayes Factor. BLMM, with its extensions such as Generalized BLMM, has great flexibility and capability, they can and should be applied in various psychology research.

Key words: Bayesian, linear mixed-effects modeling, hierarchical models, Bayes Factor, brms

中图分类号: 

  • B841
[1] 胡啸. 信号检测论与贝叶斯决策理论的关系 [J]. 心理技术与应用, 2023, 11(9): 542-558.
[2] 朱训, 顾昕. 贝叶斯因子及其应用 [J]. 心理技术与应用, 2023, 11(9): 514-527.
[3] 王允宏, Don van den Bergh, Frederik Aust, Alexander Ly, Eric-Jan Wagenmakers, 胡传鹏. 贝叶斯方差分析在JASP中的实现 [J]. 心理技术与应用, 2023, 11(9): 528-541.
[4] 乔欣宇 冯咏琳 潘俊豪. 贝叶斯结构方程模型的原理及应用 [J]. 心理技术与应用, 2023, 11(10): 599-619.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 辛自强, 张红川, 孙铃, 于泳红, 辛志勇. 财经素养的内涵与三元结构[J]. 心理技术与应用, 2018, 6(8): 450 -458 .
[2] 张红川, 苏 凇, 吕杰妤, 张 梅, 辛自强. 基于理性决策的财经能力:概念、结构与测量[J]. 心理技术与应用, 2018, 6(8): 465 -471 .
[3] 张晶晶, 余真真, 田 浩. 亲环境行为的情理整合模型:生态情感卷入的作用[J]. 心理技术与应用, 2018, 6(8): 484 -492 .
[4] 余习德, 鲁 成, 高定国. 时间流逝感与时间观、人格之间的关系研究[J]. 心理技术与应用, 2018, 6(8): 493 -502 .
[5] 陈必忠. 社交网站积极自我呈现与主观幸福感:多重中介模型[J]. 心理技术与应用, 2018, 6(9): 528 -536 .
[6] 黄梓航, 王 可, 蔡华俭, . 利用开放数据进行心理学研究[J]. 心理技术与应用, 2018, 6(9): 549 -569 .
[7] 张红川. 从转化研究的角度理解心理学在社会服务中的功用[J]. 心理技术与应用, 2018, 6(10): 580 -581 .
[8] 谢天. 社会心理服务中的三类人[J]. 心理技术与应用, 2018, 6(10): 590 -592 .
[9] 辛志勇. 加强社会心理服务重在专业人才建设[J]. 心理技术与应用, 2018, 6(10): 591 -592 .
[10] 周莉. 学生心理健康服务可从学校和家长入手[J]. 心理技术与应用, 2018, 6(10): 599 .