2

I have a model in R that looks like this

mdl.CL  <- lmer(Y.CL ~ 1 + TL*PL*GO + (1|SUBJ), data = data.CL)

in which TL has 3 levels, PL 6 levels, and GO 2 levels only.

Now, I'd like to test the effect of GO. However, if I use both anova and summary, I obtain results that I am not sure on how to interpret. In particular, this is the (truncated) output of summary:

> summary(mdl.CL)
Linear mixed model fit by REML ['lmerMod']
Formula: Y.CL ~ 1 + TL * PL * GO + (1 | SUBJ)
   Data: data.CL

REML criterion at convergence: -1021.4

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.2480 -0.6655  0.1448  0.7411  2.4780 

Random effects:
 Groups   Name        Variance Std.Dev.
 SUBJ     (Intercept) 0.007723 0.08788 
 Residual             0.050555 0.22485 
Number of obs: 9134, groups:  SUBJ, 23

Fixed effects:
                Estimate Std. Error t value
(Intercept)     0.620697   0.018724   33.15
TL.L            0.004658   0.005998    0.78
TL.Q            0.021164   0.007135    2.97
PL.L            0.001186   0.010432    0.11
PL.Q           -0.027180   0.009702   -2.80
PL.C            0.010089   0.009453    1.07
PL^4           -0.001677   0.008922   -0.19
PL^5           -0.007471   0.007921   -0.94
GO.L            0.011405   0.005588    2.04
...

while this is the output of anova:

> anova(mdl.CL)
Analysis of Variance Table
         Df  Sum Sq  Mean Sq F value
TL        2 0.05962 0.029810  0.5896
PL        5 1.33398 0.266796  5.2773
GO        1 0.00210 0.002104  0.0416
...

As you can see, the t value from summary is 2.04 and the F value from anova is 0.0416. Now, since GO has two levels only, I'd expect the t and the F values to be closely related, but this is not the case (at least, I could not find any obvious mapping between t and F, also with other models).

Does anybody know why?

amoeba
  • 93,463
  • 28
  • 275
  • 317
ariadello
  • 21
  • 2
  • Actually, that question suggests that `anova()` computes type II sum of squares, whereas what you get from `summary()` corresponds to type III sum of squares, so this might explain the difference. See here http://stats.stackexchange.com/questions/20452 about what type I/II/III means in ANOVA. – amoeba Mar 01 '17 at 10:26
  • Or maybe not - the unanswered Q linked above is about `lmerTest::anova()`, whereas you seem to be using `lme4::anova()`. – amoeba Mar 01 '17 at 10:31
  • I'll try to have a look at the questions you posted, thanks. I'll post here again if I find a solution. – ariadello Mar 01 '17 at 12:45

0 Answers0