ezANOVA runs but converts subj into factor

68 views
Skip to first unread message

Han

unread,
Jan 29, 2018, 9:12:32 PM1/29/18
to ez4r

Hi, 

I've just started using R a few days ago and am trying to run a one-way repeated measures ANOVA.
Tried using ezANOVA but I'm stuck on a problem.

From my understanding, the data needs to be arranged in the long form (correct?), like this:


I did that. Then I tried running the one-way repeated measures ANOVA like this:


w_anova<-ezANOVA(data=df, dv=breakN, wid=subnum, within=Mask, type=3, detailed=T, return_aov = T)


print(w_anova)


It gives a warning:" Converting "subnum" to factor for ANOVA." 

The results for the within-subjects factor is comparable to MATLAB, but the conversion changes the Sums of Squares for Subjects.

Not entirely sure how to interpret this and troubleshoot. Please advise.

Many thanks!
 








Mike Lawrence

unread,
Jan 29, 2018, 9:16:23 PM1/29/18
to ez...@googlegroups.com
What you've done seems right to me. Since the subject labels are only numbers for convenience (i.e. subject #10 isn't 2x subject #5, etc), when ez encounters numbers in a column to be used as the "wid" variable it gives you a heads up that it's going to do the conversion for you. If Matlab is giving you different sums of squares, I wonder if it's treating the labels as true numbers, which would yield an incorrect analysis.


--
Mike Lawrence
Graduate Student
Department of Psychology & Neuroscience
Dalhousie University

~ Certainty is (possibly) folly ~

--
You received this message because you are subscribed to the Google Groups "ez4r" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ez4r+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages