# Nested logistic regression in R

I am trying to find a way to do Nested Logistic Regression in R that fits my needs. I have a very large data set with almost 200 variables available. I have found my "best" model and it contains 12 of these variables. I am aware of the problems of using 12 variables in logistic regression and don't want to cover those here. I am using the model to predict the probability a student will drop out of high school. The dataset I'm using that includes the students I am predicting the probability for has some missing data. So for example say my model is:

Dropout ~ AttendanceRate + Enrollments + AgeDiff + Race + Absences


Now say it is not known for a particular student how many Absences he has had. I am using the predict function to find the dropout probabilities from my model. If one of the variables is missing or "NA" then there is no predicted probability as it is NA. To fix this problem I want to use Nested logistic regression. So for a student with a missing value in "Absences" the model would be

Dropout ~ AttendanceRate + Enrollments + AgeDiff + Race


I am currently using the glm function to do my logistic regression. I understand it cannot do nested logistic regression. So how do I do Nested Logistic regression from my full model so that I can predict a students dropout probablity no matter which variable or variables may be missing. I realize using Nested models will hurt the strength of my model for prediction purposes but I am willing to sacrifice that for my purposes.

Any Suggestions?

-
"Nested logit" usually means something quite different from what you are proposing; this might be why you aren't finding what you're looking for. – Charlie Aug 31 '12 at 17:09
I find it very unfortunate that terms get used in different ways; it makes it harder for people to understand these topics & communicate w/ each other. You seem to be using "nested" in the sense of nested model tests (checking if a version of your model w/o a covariate fits significantly worse than the full model), whereas more typically, "nested logit" might refer to something like modeling the probability of students passing a test, when those students are nested w/i classes, which are nested w/i schools, etc. It's worth being clear on this distinction b/c it can be quite slippery. – gung Aug 31 '12 at 19:18
On a different note, I am not aware of a problem w/ using 12 variables in logistic regression. Can you clarify what you are referring to? – gung Aug 31 '12 at 19:21
In this case, as can be determined from my example above, I am referring to "nested Model tests". The problem I'm referring to with 12 variables is overfitting but obviously I'm not worried about that because I have no problem using 12 or more variables. I am now starting to think that replacing my missing values with one of the methods of doing so might be a better way to go, such as replacing the missing values with the median or mode(if it is a categorical variable). – Eric Sep 5 '12 at 14:19

In R one package that does this is mice.