Possible Duplicate:
Wrong results using ANOVA with repeated measures

Hello everybody, I did an experiment and I need to understand how to detect, by means of an ANOVA (repeated measures), the differences between males and females evaluations at stimulus level.

In the experiment, participants had to evaluate 7 stimuli in 2 conditions (EXP1 and EXP2). The structure of the table is the following: subject, stimulus, condition, sex, response. The design is the following:

  1. sex is a between-subjects factor (with two levels)
  2. stimulus is a within-subjects factor (with 3 assumed levels)
  3. condition is a within-subjects factor (with 2 levels)
  4. all factors are fully crossed

For example now I want to detect the difference between males and females evaluation for stimulus 1. So far the only way that I found is to use a t-test.

I used the following R command for conducting the ANOVA:

aov1 = aov(response ~ sex*stimulus*condition + Error(subject/(stimulus*condition)), data=scrd)


but I don´t see the way to understand if evaluataions between males and females for stimulus 1 are significant. I can only see if there is a difference at global level between males and females for all the stimuli. But I am interested in discovering it for each stimulus.

How can I reach this goal?....I don´t think that the interactions of the previous ANOVA code can help me.

I used the t-test in this way

table_gravel_M <- subset(my_table, stimulus == "gravel" & sex == "M")
table_gravel_F <- subset(my_table, stimulus == "gravel" & sex == "F")


Any suggestion?

Thanks in advance

Here an example of the table I used:

subject  stimulus condition sex        response

subject1    gravel  EXP1    M      59.8060
subject2    gravel  EXP1    M      49.9880
subject3    gravel  EXP1    M      73.7420
subject4    gravel  EXP1    M      45.5190
subject5    gravel  EXP1    M      51.6770
subject6    gravel  EXP1    M      42.1760
subject7    gravel  EXP1    M      56.1110
subject8    gravel  EXP1    M      54.9500
subject9    gravel  EXP1    M      62.6920
subject10   gravel  EXP1    M      50.7270
subject1    gravel  EXP2    M      70.9270
subject2    gravel  EXP2    M      61.3200
subject3    gravel  EXP2    M      70.2930
subject4    gravel  EXP2    M      49.9880
subject5    gravel  EXP2    M      69.1670
subject6    gravel  EXP2    M      62.2700
subject7    gravel  EXP2    M      70.9270
subject8    gravel  EXP2    M      63.6770
subject9    gravel  EXP2    M      72.4400
subject10   gravel  EXP2    M      58.8560
subject11   gravel  EXP1    F      46.5750
subject12   gravel  EXP1    F      58.1520
subject13   gravel  EXP1    F      57.4490
subject14   gravel  EXP1    F      59.8770
subject15   gravel  EXP1    F      55.5480
subject16   gravel  EXP1    F      46.2230
subject17   gravel  EXP1    F      63.3260
subject18   gravel  EXP1    F      60.6860
subject19   gravel  EXP1    F      59.4900
subject20   gravel  EXP1    F      52.6630
subject11   gravel  EXP2    F      55.7240
subject12   gravel  EXP2    F      66.4220
subject13   gravel  EXP2    F      65.9300
subject14   gravel  EXP2    F      61.8120
subject15   gravel  EXP2    F      62.5160
subject16   gravel  EXP2    F      65.5780
subject17   gravel  EXP2    F      59.5600
subject18   gravel  EXP2    F      63.8180
subject19   gravel  EXP2    F      61.4250
  • 1
    $\begingroup$ This question has a lot of overlap with your two other questions at stats.stackexchange.com/questions/11079/… and stats.stackexchange.com/questions/11113/… Please follow whuber's suggestions to improve them. Has your first question (Error() problem) been sufficiently answered? How is this question here different from your second one? $\endgroup$ – caracal May 28 '11 at 14:06
  • $\begingroup$ There is also a long list of tutorials and functions for this purpose here: r-statistics.com/2010/04/… $\endgroup$ – Tal Galili May 28 '11 at 14:17
  • $\begingroup$ Dear caracal, it is true that there is overlap, but in my opinion the topic is different. Indeed this time I am focusing an an aspect that in those topics is not fully treated: how to measure statistical difference between males and females AT STIMULUS level, by means of ANOVA repeated measures. Is it possible or not? If yes how? I the t-test the only solution? These are the question I would like an answer to. $\endgroup$ – L_T May 28 '11 at 14:50
  • 1
    $\begingroup$ You need to ask a more specific question than what you've posted here. Its not clear whether or not your question is theoretical or about how to get R to run the numbers. It would also help me if you write out the mathematical model you are trying to interpret, and the hypothesis you want to test in terms of that mathematical model. for e.g. $Y_{ijk}\sim N(\mu_{ijk},\sigma_{i}^{2})$ and you want to test $H_{0}:\mu_{ijk}=\mu_{ij}$ (i.e. that category $k$ is not significant). Doing it this way makes it easier to know what means or sums of squares to calculate. $\endgroup$ – probabilityislogic May 28 '11 at 15:03
  • $\begingroup$ Hi thanks for your answer. Actually I need an help both theoretically and in R. But honestly I don´t understand where my question is not clear. Mathematically I need to test H0: mean_stimulus1_males = mean_stimulus1_females That is, for each stimulus I want to know if the differences between the evaluations of the males are significantly higher than the evaluations of the females. So far I only found the t-test as method to achieve this goal, since with ANOVA I was not able to get this information. What do you suggest? Thanks in advance! $\endgroup$ – L_T May 28 '11 at 15:38