Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a measurement for two groups of subjects where each subject contains 3 replicates. For example, the data is like below:

Group Subject Replicate Value
1 A 1 0.2
1 A 2 0.3
1 A 3 0.25
1 B 1 0.4
1 B 2 0.3
1 B 3 0.7
2 C 1 0.2
2 C 2 0.1
2 C 3 0.3
2 D 1 0.4
2 D 2 0.2
2 D 3 0.25

I am thinking of using ANOVA where the subject is the error term,e.g. aov(Value~Group+Error(Subject)) in R. Is it correct?

Thanks! Gim

share|improve this question

1 Answer

To me it looks essentially correct. You still have to specify the data.frame the values are taken from in aov like

aov(Value~Group+Error(Subject), data)

This model assumes that subject were taken at random (within their group). It is justified to drop the variable "replicate" from the formula as it bears no information.

share|improve this answer
1  
Thanks for the reply. I recently came across a post using somehow a different formula for this case, e.g. a nested one way anova model as aov(Value~Group/Subject,data). The results are different. Which one is more correct? – Gim Jun 2 '12 at 19:41
Nope, I think the latter one is not what you want. The slash notation is short for aov(Value~Group+Group:Subject,data), which is a fixed effect model. Be careful of the confusion with the lme function from the nlme package, which uses the vertical bar | to specify error. – gui11aume Jun 2 '12 at 23:26
thanks for the comments! – Gim Jun 4 '12 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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