[R] aov and Error function

S Ellison S.Ellison at LGCGroup.com
Mon Feb 2 13:09:56 CET 2015


> > aovsubj <- aov(value~group+time+Error(subject),data=dataRMANOVA)
> > and
> > aovsubjgroup <- aov(value~group+time+Error(subject/group),data=dataRMANOVA)
> >
> Since no-one else seems to have answered you let me point out that your first
> formulation treats subject 1 in the "int" group as being the same as subject 1 in
> the "cont" group, and similarly for subject 2 and so on.
> 
> The second formulation (subject nested within group) treats subject 1 in the
> "int" group as being *different* from subject 1 in the "cont" group.

Yes, but that isn't all, is it? 

subject/group

means group nested in subject, expanding to 
~subject+subject:group.

so Error(subject/group) asks for a subject effect across groups _as well as_ one within groups.

S Ellison


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list