S.M. Raghavan
2010-Dec-08 16:59 UTC
[R] Confidence Intervals for Odds Ratios in multivariate logistic regression
Hi all, I am trying to fit a logistic regression for a bivariate response using five independent variables in a stepwise procedure. My outputs look okay but does any one know (or is there any literature on) how the confidence intervals are calculated for the reported odds ratios..? Thanks! [[alternative HTML version deleted]]
Bert Gunter
2010-Dec-08 17:11 UTC
[R] Confidence Intervals for Odds Ratios in multivariate logistic regression
See McCullagh and Nelder's GLM book for details -- and also probably V&R's MASS for a concise summary, although I don't have it at hand and can't be sure it's there. Really, practically any book on GLM should have details. **HOWEVER** You should realize that all these references are "wrong" in the sense that the intervals are conditioned on the model choice. AFAIK, the uncertainty due to model choice, which is typically far larger imo, is not taken into account. In situations like yours, it **can** be done, e.g. via bootstrapping the whole stepwise procedure. NOTE: *** I would appreciate corrections of these statements if I have it wrong **** -- Bert On Wed, Dec 8, 2010 at 8:59 AM, S.M. Raghavan <smraghavan at gmail.com> wrote:> Hi all, > > I am trying to fit a logistic regression for a bivariate response using five > independent variables in a stepwise procedure. My outputs look okay but does > any one know (or is there any literature on) how the confidence intervals > are calculated for the reported odds ratios..? > > Thanks! > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Bert Gunter Genentech Nonclinical Biostatistics
David Winsemius
2010-Dec-08 17:12 UTC
[R] Confidence Intervals for Odds Ratios in multivariate logistic regression
On Dec 8, 2010, at 11:59 AM, S.M. Raghavan wrote:> Hi all, > > I am trying to fit a logistic regression for a bivariate response > using five > independent variables in a stepwise procedure. My outputs look okay > but does > any one know (or is there any literature on) how the confidence > intervals > are calculated for the reported odds ratios..?There is quite a bit of literature that says doing stepwise approaches to LR results in invalid confidence intervals. (There is also quite a bit of literature on the mechanics of constructing confidence intervals that should be in any of the standard texts on the subject.) You might want to read some of the material in the archives: stat.ethz.ch/pipermail/r-help This thread (identified with RSiteSearch with alternate parameters to bring up postings to r-help) seems particularly rich in contributions from people with deep knowledge of the problems and potential solutions: finzi.psych.upenn.edu/Rhelp10/2008-October/175481.html finzi.psych.upenn.edu/Rhelp10/2008-October/175541.html finzi.psych.upenn.edu/Rhelp10/2008-October/175518.html -- David Winsemius, MD West Hartford, CT
Charles C. Berry
2010-Dec-08 18:59 UTC
[R] Confidence Intervals for Odds Ratios in multivariate logistic regression
On Wed, 8 Dec 2010, S.M. Raghavan wrote:> Hi all, > > I am trying to fit a logistic regression for a bivariate response using five > independent variables in a stepwise procedure. My outputs look okay but does > any one know (or is there any literature on) how the confidence intervals > are calculated for the reported odds ratios..? >Bert and David have wanred you about the misleading results that confidence intervals can give with stepwise procedures. There are a number of approaches that are not so misleading. For one such and perhaps some insights into the problems that David and Bert were pointing out, try this: install.packages( "BMA" ) library( BMA ) ?bic.glm example( bic.glm ) HTH, Chuck> Thanks! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >Charles C. Berry Dept of Family/Preventive Medicine cberry at tajo.ucsd.edu UC San Diego famprevmed.ucsd.edu/faculty/cberry La Jolla, San Diego 92093-0901