[R] What will produce NA for lm()?

Guojun Zhu shmilylemon at yahoo.com
Sun May 7 08:57:20 CEST 2006

I still works on the similar questions.  I have a data
frame, say d, with 33+1 colums (20 of them are 0/1
dummy variables) and about 1000 rows.   Now I do the
linear regression and get a NA for one of the dummy
variables, say a.  I check the data frame, using
"d[d$a %in% 1,]" and found there are one row  with no
NA at all.   And there are 800 0s in d$a.  I know if
there is no 1 in d$a or the no one full non-NA rwo
with d$a==1, I will get NA for d$a.  But I do not
expect a NA in my case.   What is other possibility to
produce NA d$a?  thanks.

More information about the R-help mailing list