[R] Dealing with NA (glm)

awick awick at ualberta.ca
Wed Oct 12 00:01:47 CEST 2011


I have a large amount of NAs.

Does anyone know the which command that will not throw out any rows that
include NAs?  I have to use gam/glm for now, but I know of other packages
(RandomForests) that will use the mean of the column.

Anything like this for glms?

Right now this code

glm2 <- glm(PA~pHNEW+SALNEW+ASPNEG+DIF232+HLSHD+SHRWV2+SLOPE+TOPON+TRI+DEM,
family=binomial(link="logit"), data=predmm, *na.action=na.pass)*

isn't working 

but this code

glm2 <- glm(PA~pHNEW+SALNEW+ASPNEG+DIF232+HLSHD+SHRWV2+SLOPE+TOPON+TRI+DEM,
family=binomial(link="logit"), data=predmm, *na.action=na.omit*)

is.

--
View this message in context: http://r.789695.n4.nabble.com/Dealing-with-NA-glm-tp3896156p3896156.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list