I am running an experiment testing reaction times under different conditions. I have a data sample located here and I have added a graphical plot of my data below in order to ease your understanding:

enter image description here

I would like to check whether weak emotion recognition has significantly higher error rates than all other conditions. I was told that the proper way to do this was a repeated measurement ANOVA. I have found out that this can be done via R's stats::aov() function.

I am interfacing with R via RPy and you may see my exact code under this notebook.

I am getting the following resulting summary:

Error: ID
          Df Sum Sq  Mean Sq F value Pr(>F)
Residuals  6  0.022 0.003666               

Error: Within
          Df  Sum Sq  Mean Sq F value Pr(>F)   
COI        6 0.02628 0.004379   3.468 0.0083 **
Residuals 36 0.04547 0.001263                  
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

How does this help me address my issue?

Additionally, in a discussion resulting from this other question I have been told that while anova is acceptable in some cases (such as this one) linear models such as the one generated by nlme::lme() are preferable.

I have used that function in this other notebook, and the output reads as follows:

Fixed effects: ER ~ COI 
                 Value  Std.Error DF  t-value p-value
(Intercept) 0.01928571 0.01514819 36 1.273137  0.2111
COIem-hard  0.07028571 0.01899579 36 3.700069  0.0007
COIsc-11    0.00403687 0.01899579 36 0.212514  0.8329
COIsc-15    0.01700000 0.01899579 36 0.894935  0.3768
COIsc-19    0.00417857 0.01899579 36 0.219974  0.8271
COIsc-23    0.00432488 0.01899579 36 0.227676  0.8212
COIsc-27    0.00417857 0.01899579 36 0.219974  0.8271

how am I to interpret those p-values in the context of the point I'm trying to make? Also, why is my first COI (COIem-easy) absent from the list?

As a general point I would also be very happy to hear which of these 2 approaches you advise I should use.


1 Answer 1


COIem-easy is absent because the effect is 0. What R is doing is setting that as the reference value that all other COI's are compared to. The p-value for the t-test is the test that the effect of that level is equal to 0 or not. In other words is that level of COI equal to COIem-easy.

The ANOVA is testing if there is some difference between the levels. It will not tell you which levels are different. The p-value indicates that there is one.

  • $\begingroup$ the p value also does not tell me whether one or two categories are very far away from the others - right? Also, why is the effect of COIem-easy zero? $\endgroup$
    – TheChymera
    Nov 14, 2013 at 22:13
  • $\begingroup$ Correct, the ANOVA p-value does not include that information. The hypothesis for ANOVA is just that there is a difference. COIem-easy is zero because R is defining the effects of the other levels relative to COIem-easy. $\endgroup$ Nov 15, 2013 at 14:09
  • $\begingroup$ so COIem-easy is in this case set equal to the base intercept? how does the function choose which category ID it assigns this role to? $\endgroup$
    – TheChymera
    Nov 15, 2013 at 15:34
  • $\begingroup$ It uses the first level in the factor. $\endgroup$ Nov 15, 2013 at 15:35
  • $\begingroup$ so simply the one which happens to be the first in my list? $\endgroup$
    – TheChymera
    Nov 15, 2013 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.