Michael, Thanks for the reply. I believe Aline was sgiving me CI's on coefficients as well.
So c(pred$fit + 1.96 * pred$se.fit, pred$fit - 1.96 * pred$se.fit) gives me the CI on the logits if I understand correctly? Maybe the help on predict.glm can be updated. Thanks! On 6 August 2010 01:46, Michael Bedward <michael.bedw...@gmail.com> wrote: > Sorry about earlier reply - didn't read your email properly (obviously :) > > You're suggestion was right, so as well as method for Aline below, > another way of doing the same thing is: > > pred <- predict(y.glm, newdata= something, se.fit=TRUE) > ci <- matrix( c(pred$fit + 1.96 * pred$se.fit, pred$fit - 1.96 * > pred$se.fit), ncol=2 ) > > lines( something, plogis( ci[,1] ) ) > lines( something, plogis( ci[,2] ) ) > > > > On 6 August 2010 18:39, aline uwimana <rwan...@gmail.com> wrote: > > Dear Troy, > > use this commend, your will get IC95% and OR. > > > > logistic.model <- glm(formula =y~ x1+x2, family = binomial) > > summary(logistic.model) > > > > sum.coef<-summary(logistic.model)$coef > > > > est<-exp(sum.coef[,1]) > > upper.ci<-exp(sum.coef[,1]+1.96*sum.coef[,2]) > > lower.ci<-exp(sum.coef[,1]-1.96*sum.coef[,2]) > > > > cbind(est,upper.ci,lower.ci) > > > > regards. > > > > 2010/8/6 Troy S <troysocks-tw...@yahoo.com> > > > >> Dear UseRs, > >> > >> I have fitted a logistic regression using glm and want a 95% confidence > >> interval on a response probability. Can I use > >> > >> predict(model, newdata, se.fit=T) > >> > >> Will fit +/- 1.96se give me a 95% of the logit? And then > >> exp(fit +/- 1.96se) / (exp(fit +/- 1.96se) +1) to get the probabilities? > >> > >> Troy > >> > >> [[alternative HTML version deleted]] > >> > >> ______________________________________________ > >> R-help@r-project.org mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide > >> http://www.R-project.org/posting-guide.html > >> and provide commented, minimal, self-contained, reproducible code. > >> > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.