3
$\begingroup$

I have experimental data of response times that differ according to the factor TrialType: Regular or Random. I also have two groups, A and B, which I expect to behave the same (they were created for counterbalancing purposes).

I want to test the equality of variance assumption in my data. I am pretty sure the variances are not equal, but I want to show it with a test anyway.

My data is contained in a long data.frame called AB:

summary(AB)
Block          Trial         TrialType      Subject          variable      value       
 Block1:1930   Min.   :  1.0   Random :5889   Length:9852        RT:9852   Min.   : 348.0  
 Block2:1974   1st Qu.:128.0   Regular:3963   Class :character             1st Qu.: 595.0  
 Block3:1982   Median :252.0                  Mode  :character             Median : 692.0  
 Block4:1983   Mean   :251.9                                               Mean   : 765.7  
 Block5:1983   3rd Qu.:376.0                                               3rd Qu.: 834.0  
           Max.   :500.0                                               Max.   :4412.0  
 Group   
 A:4929  
 B:4923  

I tried the Levene Test using both Group and TrialType as grouping factor (the second argument):

leveneTest(AB$value,AB$Group)

leveneTest(AB$value,AB$TrialType)

As you can see, I am still unclear whether the second argument should be Group (A and B) or TrialType (random and regular). I just tried both.

For group, the p-value it was 8.479e-11, and for TrialType, p was 2.413e-12. Also, the degrees of freedom for both cases is 1, and the F values are very high: 42,23 for Group and 49.24 for TrialType. So the 3 values I am getting from these tests seem highly unusual. Therefore I suspect I might be doing something wrong. Any comments or/and help is much appreciated. Also, any tips on how to report these results would be most welcome.

$\endgroup$

1 Answer 1

2
$\begingroup$

Remember it's the residuals from your model that should be distributed with equal variances. You want to use Group & TrialType together as grouping factors: leveneTest(value~TrialType*Group, data=AB).

$\endgroup$
2
  • $\begingroup$ Thanks so much for the clarification @Scortchi. Would you happen to know how to report this? Is it the same as with other p-value reports? e.g. F(df)= , p < 0.001 ? $\endgroup$
    – HernanLG
    Commented Jun 13, 2013 at 9:38
  • $\begingroup$ Depends on the readers of your report & the level of detail you want to go into; but describing the test & giving the observed value of the test statistic & p-value should be fine in general. $\endgroup$ Commented Jun 15, 2013 at 9:02

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.