statistics.com statistics.com
|
| View previous topic :: View next topic |
| Author |
Message |
frodo.jedi
Joined: 03 Jun 2010 Posts: 12
|
Posted: Fri Jun 04, 2010 1:22 pm Post subject: ANOVA with R, help needed for a simple example |
|
|
Hi all,
I have problems in understanding how to perform ANOVA with R.
I have a very simple case to analize. I did an experiment with a recognition task. I presented 3 types od stimuli: audio, visual and audio-visual.
I want to know if the differences are statistically significant, i.e. if with the audio-visual stimuli the performances are better than the audio stimuli or the visual stimuli.
Here the row data (frequencies):
| Correct answers | Wrong answers
Visual | 49 | 31
Audio | 59 | 41
Audio-Visual | 80 | 20
Can you please give me a R code example in order to perform this analisis?
I really have problems in understanding, even if I tried to study different materials.
Help!
Thanks in advance
Frodo |
|
| Back to top |
|
 |
alethephant
Joined: 06 Sep 2006 Posts: 200 Location: Virginia Beach
|
Posted: Fri Jun 04, 2010 10:20 pm Post subject: ANOVA with R |
|
|
This is not actually an ANOVA application. It is a contingency table application.
> x<- matrix(c(49,31, 59,41, 80,20), ncol=2, byrow=TRUE)
> rownames(x)<- c('Visual','Audio', 'Audio-Visual')
> colnames(x)<- c('Correct','Wrong')
> x
Correct Wrong
Visual 49 31
Audio 59 41
Audio-Visual 80 20
> chisq.test(x)
Pearson's Chi-squared test
data: x
X-squared = 11.7579, df = 2, p-value = 0.002798
> chisq.test(x[1:2,])
Pearson's Chi-squared test with Yates' continuity correction
data: x[1:2, ]
X-squared = 0.0234, df = 1, p-value = 0.8783
> chisq.test(x[c(1,3),])
Pearson's Chi-squared test with Yates' continuity correction
data: x[c(1, 3), ]
X-squared = 6.7992, df = 1, p-value = 0.00912
> chisq.test(x[2:3,])
Pearson's Chi-squared test with Yates' continuity correction
data: x[2:3, ]
X-squared = 9.4351, df = 1, p-value = 0.002129
Row 3 has a different proportion correct than rows 1 and 2, which are indistinguishable. |
|
| Back to top |
|
 |
frodo.jedi
Joined: 03 Jun 2010 Posts: 12
|
Posted: Sat Jun 05, 2010 3:31 am Post subject: |
|
|
Hello,
thanks a lot for your answer. I know the chi square test (also with R), and also for me it would be better to apply it for this case. But I must apply the ANOVA, and moreover I want to learn it.
Could you help me?
Cheers
Frodo |
|
| Back to top |
|
 |
frodo.jedi
Joined: 03 Jun 2010 Posts: 12
|
Posted: Wed Jun 09, 2010 10:57 am Post subject: |
|
|
Hi all,
the formulation of my problem was not correct in order to justify the ANOVA.
With that data was better to use a chi-square test.
The ANOVA can be applied in this case if I formulate the problem in this way:
H=c(7,7,7,7,7,7,7,7,7,0,7,7,7,7,7)
H_1=c(7,7,7,6,7,7,7,7,7,1,7,7,6,7,7)
H_2=c(7,7,7,7,7,7,7,7,7,0,7,7,7,6,7)
H_S1=c(6,7,7,7,7,7,7,7,6,7,3,7,6,7,6)
H_S2=c(7,7,7,7,6,7,7,7,6,4,5,7,7,7,7)
H_S3=c(1,2,1,2,6,7,1,7,6,4,5,1,11,1)
I need to know if the differences between these groups are statistically significant. I need to find also the p-values.
At the moment I have problems with the R code. Please help.
Indeed from one side I do not understand the difference between the functions aov() and anova().
From the other side I am not able to apply them ;-(
Could you please give me a quick example with these data?
Thanks in advance
Best regards
Frodo |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|