[R] aov - subjects nested within groups & crossed with questions
Doug Adams
fog0 at gmx.com
Tue Jun 22 22:10:33 CEST 2010
Hello,
I was going to use lmer() on this data, but it seemed easier -- and
more importantly, more meaningful -- to just analyze smaller sections
of it individually. I'd like to ask for help to see if I'm analyzing
the separate parts correctly. Each part is the same, and they all
look like this:
______________________________________________________________
question 1 question 2 question 3 question 4
group 1
subject 1 # # # #
subject 2 # # # #
subject 3 # # # #
subject 4 # # # #
subject 5 # # # #
subject 6 # # # #
subject 7 # # # #
subject 8 # # # #
subject 9 # # # #
subject 10 # # # #
group 2
subject 11 # # # #
subject 12 # # # #
subject 13 # # # #
subject 14 # # # #
subject 15 # # # #
subject 16 # # # #
subject 17 # # # #
subject 18 # # # #
subject 19 # # # #
subject 20 # # # #
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
This is the call to aov I used:
aov (response ~ (group*question) + Error(person/question), data)
...and this is the output I get:
______________________________________________________________
Error: person
Df Sum Sq Mean Sq F value Pr(>F)
group 1 6.086 6.0860 7.2069 0.008867 **
question 1 0.720 0.7199 0.8525 0.358696
Residuals 78 65.869 0.8445
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: person:question
Df Sum Sq Mean Sq F value Pr(>F)
question 1 18.014 18.0144 24.7920 3.671e-06 ***
group:question 1 0.004 0.0041 0.0057 0.94
Residuals 79 57.403 0.7266
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 483 390.78 0.80907
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
If I want to test for group difference, am I looking at the F value
for group under "Error: person" or does that section of the output not
take into account the entire variance structure I should be
acknowledging? Does my aov syntax seem appropriate in the first
place?
Thanks everyone very much for any help you can give,
Doug Adams
-------------- next part --------------
question 1 question 2 question 3 question 4
group 1
subject 1 # # # #
subject 2 # # # #
subject 3 # # # #
subject 4 # # # #
subject 5 # # # #
subject 6 # # # #
subject 7 # # # #
subject 8 # # # #
subject 9 # # # #
subject 10 # # # #
group 2
subject 11 # # # #
subject 12 # # # #
subject 13 # # # #
subject 14 # # # #
subject 15 # # # #
subject 16 # # # #
subject 17 # # # #
subject 18 # # # #
subject 19 # # # #
subject 20 # # # #
More information about the R-help
mailing list