Dear all, is there a automatic method to obtain Odds Ratio estimates and their confidence intervals from a GLM Logistic model? Thanks Cristian ============================================Cristian Pattaro ============================================Unit of Epidemiology & Medical Statistics Department of Medicines and Public Health University of Verona cristian@biometria.univr.it ============================================ [[alternative HTML version deleted]]
lr.mod <- glm( y ~ x + w, family=binomial ) exp( summary( lr.mod )$coef[,1:2] %*% rbind( c(1,1,1), 1.96*c(0,-1,-1) ) ) should do the job. Pack it in a function if you like, see e.g. the (so far) undocumented function ci.lin in: http://www.biostat.ku.dk/~bxc/R/ci.lin.R (depends on) http://www.biostat.ku.dk/~bxc/R/ci.mat.R Bendix ---------------------- Bendix Carstensen Senior Statistician Steno Diabetes Center Niels Steensens Vej 2 DK-2820 Gentofte Denmark tel: +45 44 43 87 38 mob: +45 30 75 87 38 fax: +45 44 43 07 06 bxc at steno.dk www.biostat.ku.dk/~bxc ----------------------> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of > Cristian Pattaro > Sent: Wednesday, March 17, 2004 11:50 AM > To: r-help at stat.math.ethz.ch > Subject: [R] Q: Odds Ratio > > > Dear all, > > is there a automatic method to obtain Odds Ratio estimates and their > confidence intervals from a GLM Logistic model? > > Thanks > Cristian > > ============================================> Cristian Pattaro > ============================================> Unit of Epidemiology & Medical Statistics > Department of Medicines and Public Health > University of Verona > cristian at biometria.univr.it > ============================================> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo> /r-help > PLEASE > do read the posting guide! > http://www.R-project.org/posting-guide.html >
On 17 Mar 2004 at 11:50, Cristian Pattaro wrote:> Dear all, > > is there a automatic method to obtain Odds Ratio estimates and their > confidence intervals from a GLM Logistic model? >The parameters in the linear predictor in logistic regression are log odds ratios (assuming the default contrast, contr.treatment). So just exponentiate it!, and do the same with the confidence limits. Maybe the best way to obtain confidence limits are library(MASS) mod <- glm(...) confint(mod) which uses likelihood profiling Kjetil Halvorsen> Thanks > Cristian > > ============================================> Cristian Pattaro > ============================================> Unit of Epidemiology & Medical Statistics > Department of Medicines and Public Health > University of Verona > cristian at biometria.univr.it > ============================================> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html