harrelfe / rms

Regression Modeling Strategies
https://hbiostat.org/R/rms
Other
172 stars 48 forks source link

How to estimate OR and 95%CI using Predict funtion for svyglm model? #139

Open jiangaimin1995 opened 9 months ago

jiangaimin1995 commented 9 months ago

design<-svydesign(data=data1115, id=~id, strata=~strata, weights=~weightage, nest=TRUE) svy.fit<-svyglm(outcome ~ age + gender + drugs + educations + income, family=quasibinomial(link="logit"), design = design) y<-predict(svy.fit) y<-as.numeric(y)

transform into probability

y<-exp(y)/(1+exp(y))

And then, how should I get the OR and 95%CI?