I'm fitting multi-level models in R using both
nlme package and
lme4. It is a very simple model.
lmeModel <- lme(Flourish ~ Week * condition, random = ~ Week|id, na.action = na.exclude)
lmerModel <- lmer(Flourish ~ Week * condition + (Week | id), na.action = na.exclude)
For each fixed effect, I get the same t-values, regardless of whether I use
lmer. Here's one of the fixed effects:
summary(lmeModel) #using nlme Fixed effects: Flourish ~ Week * condition Value Std.Error DF t-value p-value Week 0.00570 0.1728345 569 0.03297 0.9737 summary(lmerModel) #using lme4 Fixed effects: Estimate Std. Error t value Week 0.005698 0.172834 0.03
Someone has suggested that I use the
pamer.fnc function from the
LMERConvenienceFunctions package to run an ANOVA on my
lmerModel to get the p values. Here is a section of the output for the same fixed effect:
pamer.fnc(lmerModel) Df Sum Sq Mean Sq F value upper.p.val lower.p.val expl.dev.(%) Week 1 49.7262 49.7262 5.0849 0.0244 0.0246 0.1043
Can anyone explain why the t-value of the fixed effect 0.03 (p = 0.97), which is not significant at all, but the F-value of the same fixed effect is 5.08 (p ≈ 0.02), which is significant? I really appreciate any help anyone can provide. Thanks a lot!