I want to use both anova and linear models to test the assumption that my some of my categories have different means than the rest.
I am using stats::aov for anova and nlme::lme for linear modelling. The full code is available in this notebook.
Basically I end up getting:
Error: ID
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 6 0.01198 0.001997
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
COI 7 0.01926 0.002752 1.92 0.0903 .
Residuals 42 0.06020 0.001433
and
Fixed effects: ER ~ COI
Value Std.Error DF t-value p-value
(Intercept) 0.00200000 0.01465712 42 0.1364525 0.8921
COIemotion-hard 0.05600000 0.02023699 42 2.7672098 0.0084
COIscrambling-06 0.04218045 0.02023699 42 2.0843242 0.0433
COIscrambling-10 0.02094737 0.02023699 42 1.0351029 0.3065
COIscrambling-14 0.00685714 0.02023699 42 0.3388420 0.7364
COIscrambling-18 0.02085714 0.02023699 42 1.0306445 0.3086
COIscrambling-22 0.04885714 0.02023699 42 2.4142493 0.0202
COIscrambling-26 0.02742857 0.02023699 42 1.3553681 0.1825
Which means that lme is telling me 3 groups may significantly lie outside the range of the others, while aov is telling me the probability of ANY GROUP AT ALL being different from the others is not significant (using a p=0.05 cutoff).
What am I to make of this? Do I understand these results correctly?
aov()
vs.lme()
. $\endgroup$