[R] missing values in logistic regression

Avril Coghlan avril.coghlan at ucd.ie
Fri Oct 29 11:34:35 CEST 2004


Dear R help list,

   I am trying to do a logistic regression
where I have a categorical response variable Y
and two numerical predictors X1 and X2. There
are quite a lot of missing values for predictor X2.
eg.,

Y     X1   X2
red   0.6  0.2    *
red   0.5  0.2    *
red   0.5  NA
red   0.5  NA
green 0.2  0.1    *
green 0.1  NA
green 0.1  NA
green 0.05 0.05   *


I am wondering can I combine X1 and X2 in
a logistic regression to predict Y, using
all the data for X1, even though there are NAs in
the X2 data?

Or do I have to take only the cases for which
there is data for both X1 and X2? (marked
with *s above)

I will be very grateful for any help,

sincerely,
Avril Coghlan
University College Dublin, Ireland




More information about the R-help mailing list