Rory, When I searched online, I found an issue with lme4 on GitHub that suggests this error is "due to NA values in non-factor variables". https://github.com/lme4/lme4/issues/246
Hope this helps. Jean On Tue, Sep 22, 2015 at 8:18 AM, Rory Wilson <roryrwil...@yahoo.ca> wrote: > Hello all, I am trying to run a random intercept model using lme4. The > random effect is a factor of 29 possibilities, making a model with one > random effect (one level). It is just a linear model. There are 713 > observations. However, when trying to run the model I receive the > error "Error: (p <- ncol(X)) == ncol(Y) is not TRUE", > a search for which reveals somewhat surprisingly little. Has anyone seen > this before? Note that if I simply change the random effect into a fixed > effect and use lm, the model works perfectly.Thank you!Rory > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.