missing data again

52 views
Skip to first unread message

Wiltrud Fassbinder

unread,
Feb 3, 2019, 12:40:55 AM2/3/19
to ez4r

I have seen that every time someone complains about " One or more cells is missing data. Try using ezDesign() to check your data" and they claim they don't have any missing cells or contrasts, they are wrong. But I just can't find it in my data. It started once I added the "CATc3" variable to the analysis


I ran "temp = as.data.frame(table(ALL_Sacatn$SubjectID))", but all have the correct number of factors. I used ezDesign, but they all look just fine to me. Any suggestions?

ezDesign (
  data = ALL_Sacatn,
  x = WOC,
  y = Mod,
  row = CATc3)

ezDesign (
  data = ALL_Sacatn,
  x = SentType,
  y = WOC,
  row = CATc3)

ezDesign (
  data = ALL_Sacatn,
  x = Mod,
  y = SentType,
  row = CATc3)

ezDesign (
  data = ALL_Sacatn,
  x = Mod,
  y = SentType,
  row = WOC)

ezANOVA (
  data = ALL_Sacatn, 
  dv = ACC, 
  wid = .(SubjectID), 
  within = .(WOC, Mod, SentType, CATc3), 
  return_aov = F
)



ez4r.txt
ezDesign.pdf

Wiltrud Fassbinder

unread,
Feb 3, 2019, 1:03:29 PM2/3/19
to ez4r
Here is the testing I did, in addition to the ezDesign

> temp = as.data.frame(table(ALL_Sacatn$SubjectID))
> temp[temp$Freq<8,]
[1] Var1 Freq
<0 rows> (or 0-length row.names)
> x <- is.na(ALL_Sacatn$WOC)
> nrow(x)
NULL
> x <- is.na(ALL_Sacatn$CATc3)
> nrow(x)
NULL
> x <- is.na(ALL_Sacatn$SentType)
> nrow(x)
NULL
> x <- is.na(ALL_Sacatn$Mod)
> nrow(x)
NULL


Mike Lawrence

unread,
Feb 3, 2019, 8:31:11 PM2/3/19
to ez...@googlegroups.com
What does the following output?

cells = with(ALL_Sacatn, data.frame(table(SubjectID, WOC, Mod, SentType, CATc3)))
any(cells$Freq==0)
cells[which(cells$Freq==0),]

Wiltrud Fassbinder

unread,
Feb 6, 2019, 2:07:25 PM2/6/19
to ez4r
Hi Mike,
thank you for your help. This code is really helpful for someone like me who isn't that great in R. I added 'nrow(cells$Freq==0)' to see if there was any missing data.

I found my mistake, and it's rather embarrassing: CATc3 is between, not within subjects. So I hope this exchange helps everybody else out there trying to figure out the 'missing data' warning: Check your design, and use Mike's code to find where the problem is :-)

Rémi Thériault

unread,
Jul 12, 2021, 1:26:50 PM7/12/21
to ez4r
Just dropping in to say that this thread really helped me! I didn't have any missing data but one of the conditions for the participants was incorrect (it was a duplicate rather than the correct condition name), so I was able to detect it thanks to Mike's method. I corrected the mistake in the original data set and ezANOVA then worked right away. Thank you so much, I was starting to seriously pull my hair on this one! I wonder if the error message, in this case, should be more clear that it might not only be missing data but that one of the conditions is incorrect. Using ezDesign() didn't reveal anything either.

Mike Lawrence

unread,
Jul 12, 2021, 1:33:13 PM7/12/21
to ez...@googlegroups.com
In the case you describe, ezDesign should have showed an empty cell for the participant if you'd included participant among the variables vizualized; or maybe there were so many variables that you couldn't include them all? I guess a better error message would include a print of a table of those participants missing data.

--
Mike Lawrence, PhD
Co-founder & Research Scientist
Axem Neurotechnology
axemneuro.com

~ Certainty is (usually) 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+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ez4r/490b4a20-c57f-4e9a-97ff-5ae99e3b23d4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages