title: (p <- ncol(X)) == ncol(Y) is not TRUE error in glmer
body: <p>I'm trying to fit a model with a <code>glmer</code> and I keep getting the error:</p>
  
  <blockquote>
    <p>Error : (p &lt;- ncol(X)) == ncol(Y) is not TRUE</p>
  </blockquote>
  
  <p>It's a large model, with 8 features and several thousand points. When researching this bug, I found that it could be caused by too many <code>NA</code>s. I looked at my features, and only one of them had any <code>NA</code>s. I then excluded that feature from my model, but I still I got the error. The data is too large and cannot be posted. </p>
  
  <p><a href="http://r.789695.n4.nabble.com/Error-from-lme4-quot-Error-p-lt-ncol-X-ncol-Y-is-not-TRUE-quot-td4712617.html" rel="nofollow">http://r.789695.n4.nabble.com/Error-from-lme4-quot-Error-p-lt-ncol-X-ncol-Y-is-not-TRUE-quot-td4712617.html</a></p>
  
  <p>The model is as follows: </p>
  
  <pre><code>covariates=c("Sex", "PC1", "PC2", "PC3", "PC4", "label", "Alive")
  
  fix.eff=paste("outcome","~",xi)
  
  if (!is.null(covariates)) {for (covi in covariates)  fix.eff=paste(fix.eff,"+",covi) }
  
  fix.eff=formula(paste(fix.eff, "+(1|",ind.family,")")) 
  
  fit &lt;- try(glmer(fix.eff,family=binomial(link='logit'), data=x))
  </code></pre>