title: How I predict a response with NA using logistic regression in R?
body: <p>I have this data set:    </p>
  
  <p>age -- job ------- loan -- y<br>
  57 -- retired - - -  yes -- no<br>
  44 -- admin - - --   no -- no<br>
  39 -- unknown --   no --  no<br>
  47 -- services --  no -- yes<br>
  41 -- admin  -----    no -- NA<br>
  51 -- teacher  ---  yes --no<br>
  45 -- unknown -- no -- yes<br>
  57 -- retired ------   no -- no<br>
  42 -- teacher -----   no  --NA<br>
  30 -- student -----   no -- NA  </p>
  
  <p>I want to predict all the values of y by using logistic regression, but I get only 7 out of 10 predictions. So, it omits the cases with <code>y==NA</code>.</p>
  
  <p>Here is my codes:</p>
  
  <pre><code> fit &lt;- glm(y~ age+ as.factor(job)+ as.factor(loan), data= mydat, family=binomial)     
   predict( fit, type="response", na.action=na.pass)        
  </code></pre>
  
  <p>How I can predict the response value <code>y</code> even in cases with missing values?</p>