[R] Error from lme4: "Error: (p <- ncol(X)) == ncol(Y) is not TRUE"

Adams, Jean jvadams at usgs.gov
Tue Sep 22 19:46:22 CEST 2015


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".

Hope this helps.


On Tue, Sep 22, 2015 at 8:18 AM, Rory Wilson <roryrwilson at 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 at 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]]

More information about the R-help mailing list