Skip to content
Prev 310717 / 398506 Next

Missing values and geeglm

model<-geeglm(outcome~predictor+confounder, family=binomial(link = "logit"), 
data=na.omit(DataMiss), corstr='ar1', id=id, std.err="san.se") 

There could be other variables in DataMiss that have many missing values, so
when you apply na.omit() on DataMiss, you may be ending up with an empty
data.frame. Try subsetting DataMiss to only the variables you will use for
the model, and then taking na.omit of it outside of your model statement.

DataMissOm <- na.omit(subset(DataMiss, select = c(outcome, predictor,
confounder, id)))
model<-geeglm(outcome~predictor+confounder, family=binomial(link = "logit"), 
data=DataMissOm, corstr='ar1', id=id, std.err="san.se") 



--
View this message in context: http://r.789695.n4.nabble.com/Missing-values-and-geeglm-tp3675622p4649433.html
Sent from the R help mailing list archive at Nabble.com.