I'm trying to do a logistic regression on some data.
Here's a simplified version of the situation:
I'm trying to predict student success based on their history, etc. One of my predictors is the percentage of the courses they've passed in the past. If they haven't taken any courses, I don't want to set that to zero, because that's obviously different from having failed all their courses. Right now, these cases are set as NaN, but when I use the glm function in R, I get the following error:
Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, : NA/NaN/Inf in foreign function call (arg 1)
How do I predict performance for individuals who haven't taken any courses yet?