LanguageR/ lme4:对具有随机相关参数的模型的 p 值有任何帮助吗?
我使用包 languageR
来实现混合效果模型,其语法在本文末尾。我可以使用 pvals.fnc
获取模型 1 和 3(hd_lmer1
和 hd_lmer2
)的 p 值。将其与模型二一起使用会给出以下错误消息:
p2 = pvals.fnc(hd_lmer2) pvals.fnc(hd_lmer2) 中的错误: lme4_0.999375 中尚未实现 MCMC 采样 对于具有随机相关参数的模型
如果有人能帮助我了解如何获取此类模型的 p 值,我将不胜感激。
型号:
hd_lmer1 <- lmer(
rot ~ time + group + sex + gen + (1 | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
hd_lmer2 <- lmer(
rot ~ time + group + sex + gen + (time | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
hd_lmer3 <- lmer(
rot ~ time * group + sex + gen + (1 | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
I use the package languageR
for mixed effect models with the syntax at the end of this posting. I can use pvals.fnc
to get p-values for models 1 and 3 (hd_lmer1
and hd_lmer2
). Using this with model two gives the following error message:
p2 = pvals.fnc(hd_lmer2)
Error in pvals.fnc(hd_lmer2) :
MCMC sampling is not yet implemented in lme4_0.999375
for models with random correlation parameters
I would be grateful if any one could help me out on how to get p-values for such models.
Models:
hd_lmer1 <- lmer(
rot ~ time + group + sex + gen + (1 | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
hd_lmer2 <- lmer(
rot ~ time + group + sex + gen + (time | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
hd_lmer3 <- lmer(
rot ~ time * group + sex + gen + (1 | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一篇旧帖子,但这里有一个可能有帮助的解决方案,使用模型比较方法来测试 hd_lmer2 是否比 hdlmer1 产生更好的拟合(即,随机效应的添加是否显着)。
It is an old post but here is one possible solution that can be helpful, using a model comparison method to test if hd_lmer2 produces a better fit than hdlmer1 (i.e., if the addition of the random effect is significative or not).