title: Predict.glm not predicting missing values in response
body: <p>For some reason, when I specify glms (and lm's too, it turns out), R is not predicting missing values of the data.  Here is an example:</p>
  
  <pre><code>y = round(runif(50))
  y = c(y,rep(NA,50))
  x = rnorm(100)
  m = glm(y~x, family=binomial(link="logit"))
  p = predict(m,na.action=na.pass)
  length(p)
  
  y = round(runif(50))
  y = c(y,rep(NA,50))
  x = rnorm(100)
  m = lm(y~x)
  p = predict(m)
  length(p)
  </code></pre>
  
  <p>The length of p should be 100, but its 50.  The weird thing is that I have other predicts in the same script that do predict from missing data.  </p>
  
  <p>EDIT:  It turns out that those other predicts were quite wrong -- I was doing <code>imputed.value = rnorm(N,mean.from.predict,var.of.prediction.interval)</code>.  This <em>recycled</em> the mean and sd vectors from the lm predict or glm predict functions when <code>length(predict)&lt;N</code>, which was quite different from what I was seeking.  </p>
  
  <p>So my question is <strong>what about my example code is stopping glm and lm from predicting missing values?</strong></p>
  
  <p>Thanks!</p>