Question

I have run a logistic regression in R using the following code:

   logistic.train.model3 <- glm(josh.model2, family=binomial(link=logit), data=auth, na.action = na.exclude)
    print(summary(logistic.train.model3)) 

My response variable is binary, taking on values of 1 or 0.

when I look at the summary, everything looks fine, every variable has a coefficient.

However, when I try to output the predicted probabilities using the following code:

auth$predict.train.logistic <- predict(logistic.train.model3, type = "response")

Almost 20% of my predictions are "NA". How can this be? What is going on? Thanks in advance!

Was it helpful?

Solution

Do you have NA in your variables? If so, you'll get NA for predict value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top