Generalized linear mixed models (GLMMs) are widely used for analyzing correlated data, such as longitudinal and multilevel data. With over 15 $\texttt{R}$ packages available on $\texttt{CRAN}$ for fitting GLMMs, practitioners face a difficult choice regarding which package yields accurate estimates, converges reliably, and offers reasonable computational speed. Existing comparisons are either limited to methods within a single package or focus on narrow criteria such as speed alone. To address this gap, we systematically compared seven representative $\texttt{R}$ packages -- $\texttt{lme4}$, $\texttt{GLMMadaptive}$, $\texttt{glmmTMB}$, $\texttt{MASS}$, $\texttt{hglm}$, $\texttt{brms}$, and $\texttt{rstanarm}$ -- that implement different estimation frameworks. By using Monte Carlo simulations across 24 scenarios, we evaluated each package in terms of convergence ratios, computational time, estimation accuracy, and hypothesis testing performance. Our results showed that $\texttt{lme4_AGQ}$ and $\texttt{GLMMadaptive}$ yield the highest accuracy and convergence ratios, although $\texttt{GLMMadaptive}$ becomes slower under complex random-effect structures. $\texttt{lme4_LA}$ and $\texttt{glmmTMB}$ are computationally fast but exhibit lower convergence ratios and larger bias, especially for variance components. $\texttt{MASS}$ and $\texttt{hglm}$ are also fast, but $\texttt{MASS}$ yields liberal univariate tests and $\texttt{hglm}$ lacks support for correlated random effects and multivariate testing. Between two Bayesian packages, $\texttt{rstanarm}$ converges reliably and produces valid univariate tests, whereas $\texttt{brms}$ is extremely slow, limiting its practical utility. Based on these findings, we provide practical recommendations for choosing GLMM tool in applied research.


翻译:广义线性混合模型(GLMMs)广泛应用于分析相关性数据,如纵向数据和多层数据。由于CRAN上有超过15个R包可用于拟合GLMMs,实践者面临一个困难的选择:哪个包能够提供准确的估计、可靠地收敛,并具有合理的计算速度。现有的比较要么局限于单一包内的方法,要么仅关注速度等狭窄标准。为弥补这一空白,我们系统比较了七个具有代表性的R包——lme4、GLMMadaptive、glmmTMB、MASS、hglm、brms和rstanarm——它们实现了不同的估计框架。通过使用24种情景的蒙特卡洛模拟,我们评估了每个包的收敛率、计算时间、估计准确性和假设检验性能。结果显示,lme4_AGQ和GLMMadaptive在准确性和收敛率方面表现最佳,尽管GLMMadaptive在复杂随机效应结构下变得较慢。lme4_LA和glmmTMB计算速度快,但收敛率较低且偏差较大,尤其在方差分量方面。MASS和hglm也很快,但MASS产生宽松的单变量检验,而hglm缺乏对相关随机效应和多变量检验的支持。在两个贝叶斯包中,rstanarm可靠收敛并生成有效的单变量检验,而brms极其缓慢,限制了其实用性。基于这些发现,我们为应用研究中选择GLMM工具提供了实用建议。

0
下载
关闭预览

相关内容

大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
NeurIPS 2021 | 微观特征混合进行宏观时间序列预测
专知会员服务
43+阅读 · 2021年11月12日
专知会员服务
26+阅读 · 2021年9月9日
最新《图嵌入组合优化》综述论文,40页pdf
AmpliGraph:知识图谱表示学习工具包
专知
40+阅读 · 2019年4月6日
使用 Bert 预训练模型文本分类(内附源码)
数据库开发
102+阅读 · 2019年3月12日
基于R语言进行Box-Cox变换
R语言中文社区
45+阅读 · 2018年11月19日
R语言数据挖掘利器:Rattle包
R语言中文社区
21+阅读 · 2018年11月17日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
边缘计算的军事应用
专知会员服务
4+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
8+阅读 · 8月8日
《多域冲突比较支持模型》60页
专知会员服务
13+阅读 · 8月7日
相关VIP内容
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
NeurIPS 2021 | 微观特征混合进行宏观时间序列预测
专知会员服务
43+阅读 · 2021年11月12日
专知会员服务
26+阅读 · 2021年9月9日
相关基金
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员