Skip to content
Back to formatted view

Raw Message

Message-ID: <1352841092876-4649433.post@n4.nabble.com>
Date: 2012-11-13T21:11:32Z
From: joann
Subject: Missing values and geeglm
In-Reply-To: <1311003281873-3675622.post@n4.nabble.com>

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.