lmer Get p values from anova

时间:2016-07-11 21:12:18

标签: anova mixed-models p-value

lmerTest was designed as a wrapper to permit estimation of p-values from lmer mixed model analyses, using the Satterthwaite estimate of denominator degrees of freedom (ddf). But lmerTest now appears to be broken. It presently returns a message that there was an internal calculation error and returns only the lmer result (with no p-values). I have been able to calculate the p-values from the summary() function, using Dan Mirman's excellent code for calculating the Kenward-Rogers estimate of ddf. But I can't find equivalent code to calculate the p-values in an anova call on the lmer model. I suspect that one just needs to feed anova() a ddf, but I can't figure out how to do that.

Thanks in advance to anyone that can suggest solutions for this problem.

Larry Hunsicker

1 个答案:

答案 0 :(得分:2)

每当在获得Satterthwaite近似时发生一些计算错误时(例如在计算渐近方差协方差矩阵中),lmerTest返回lme4包的anova输出。 lmerTest没有被打破,只是可能有例子无法计算Satterthwaite的近似值。根据我的经验,这种情况并不经常发生。