I have the following issue in R.
I perform logistic regression in R:
logitMod <- glm(dependent_var ~ var1, var2, varN, data=traindata, family=binomial())
Then, I run predict on the first record of the testdata set, to get the log odds:
>predict(logitMod, testdata) -44.81362
Then I calculate the probability from the log odds:
> 1/(1+ exp(-predict(logitMod, testdata))) 3.449006e-20
Then, I check with the predict function what the built-in probability-conversion would yield, and the result is very different:
>predict(logitMod, testdata, type="response") 2.220446e-16
So my question is, what am I overlooking?