I'm trying to run a simple one-way ANCOVA with the lmer function in R package lme4, but have encountered some conceptual problem. The data file MyData.txt is like this:
Group Subj Cov Resp A 1 3.90 4.05 A 2 4.05 4.25 A 3 4.25 3.60 A 4 3.60 4.20 A 5 4.20 4.05 A 6 4.05 3.85 B 7 3.85 4.15 B 8 4.15 4.60 B 9 4.60 4.15 B 10 4.15 4.40 B 11 4.40 3.35 B 12 3.35 3.80 B 13 3.80 3.90 Since I would like to treat subject (Subj) as a random factor, my one- way ANCOVA (with covariate, Cov) is: TestData=read.table("MyData.txt", header=T); m1 <- lmer(Resp ~ Group * Cov + (1 | Subj), TestData) but I got the following error message: Error in lmerFactorList(formula, mf, fltype) : number of levels in grouping factor(s) 'Subj' is too large Do I have some misconception about the model? Thank you very much. Gang ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.