I am trying to use ezANOVA with Anteriority, Laterality, and bin as within-subject factors, and group as the between-group factor:
bw = ezANOVA(data=subbins, dv = .(erp), wid = .(Subject), within = .(Anteriority, Laterality, bin), between = .(Group))
But when I run it I get this error:
Error in ezANOVA_main(data = data, dv = dv, wid = wid, within = within, :
One or more cells is missing data. Try using ezDesign() to check your data.
I have used ezDesign to check my data and haven't found any missing data. Also, when I only use two within subject factors of any combination (Anteriority and Laterality; Anteriority and bin; Laterality and bin) I do not get the error and the ANOVA runs fine.
Here is information on my data:
str(subbins)
'data.frame': 174 obs. of 6 variables:
$ erp : num -5.27 -1.37 -2.42 -1.73 -2.87 ...
$ bin : Factor w/ 2 levels "3","7": 1 1 1 2 2 2 1 1 1 2 ...
$ Anteriority: Factor w/ 2 levels "Anterior","Posterior": 1 1 2 1 2 2 1 1 2 1 ...
$ Laterality : Factor w/ 3 levels "Central","Left", "Right": 2 3 1 1 2 3 2 3 1 1 ...
$ Subject : Factor w/ 29 levels "AMC126","AMC131",..: 21 21 21 21 21 21 22 22 22 22 ...
$ Group : Factor w/ 2 levels "AMC","LHD": 2 2 2 2 2 2 2 2 2 2 ...
head(subbins)
erp bin Anteriority Laterality Subject Group
13 -5.271 3 Anterior Left LHD009 LHD
15 -1.373 3 Anterior Right LHD009 LHD
17 -2.417 3 Posterior Central LHD009 LHD
38 -1.734 7 Anterior Central LHD009 LHD
40 -2.870 7 Posterior Left LHD009 LHD
42 -4.718 7 Posterior Right LHD009 LHD
I've also attached my complete dataset (full.csv) and the subset of the data that I am currently working with (subset.csv).
Does anyone have any idea why this won't work when I include all three within subject factors?