ANCOVA with afex in R: Error: Empty cells in between-subjects design, however no NA's

599 Views Asked by At

I am performing a factorial ANCOVA in R using aov_ez from the afex package. I have two binary covariates both coded as factors and dummies (0 and 1). There is no missing data in the dataset or in the covariate columns.

However, when I run aov_ez it works fine with one of the covariates, with the following model:

model<-aov_ez("ID","SCORE",data = ALL,between = c("CULTURE","COHORT"), within = c("CONSTRUAL","CONDITION"),covariate = c("SCS"),factorize = F)

But for the other (see below) I get the following error message: Error: Empty cells in between-subjects design (i.e., bad data structure).

model<-aov_ez("ID","SCORE",data = ALL,between = c("CULTURE","COHORT"), within = c("CONSTRUAL","CONDITION"),covariate = c("FOREIGN.P"),factorize = F)

How can this be? Again, I'm certain that the covariate FOREIGN.P is factors with two levels and that there is no missing data points.

0

There are 0 best solutions below