title: glm with missing values
body: <p>I'm creating a model with a binary response (purchase vs no purchase) and I have some variables that should predict the response, some have different levels, some are just numbers. So I'm making a multiple logistic regression. The code I'm using now is: </p>
  
  <pre><code>Data.omit = na.omit(Data)
  model.null = glm(aankoop ~ 1, data=Data.omit,family =binomial(link="logit"))
  model.full = glm(aankoop ~.,data=Data.omit,family = binomial(link="logit"))
  step(model.null,scope = list(upper=model.full),direction="both",test="Chisq",data=Data)
  model.final = glm(aankoop ~ duration + number_of_pages + recentvisits +householdtypology_gfk + device + os + engine + browser + medium,data=tabelx3,family = binomial(link="logit"),na.action(na.pass))
  summary(model.final)
  </code></pre>
  
  <p>I have some questions about this. My data has a lot of missing values because of one variable. It would be a shame to remove all rows with a missing value because of that one variable, a lot of information would be lost. </p>
  
  <p>If I look at the code, model.final doesn't use the dataset Data.omit, so does that mean that this includes all rows with missing values? I tried using na.action(na.pass), but I discovered if I use na.action(na.omit), the result is just the same, so what is the difference?</p>
  
  <p>Is there a possibility to create a model based on all the rows with NA values? One detail is that the variable with the many missing values has NA, it means that a user is not registered. Only if it's not NA, it means the user has registered and has filled in this information. So the variable actually has a meaning if it's NA. If these values (for non-registered users) are predicted by values for registered users, I guess that's wrong.</p>