From: Frank Harrell <f.harrell_at_vanderbilt.edu>

Date: Wed, 18 May 2011 09:52:05 -0700 (PDT)

*>
*

*>
*

> Logistic Regression Model

*> lrm(formula = response ~ x, data = dat, x = T, y = T)
*

*>
*

*> Model Likelihood Discrimination Rank Discrim.
*

*> Ratio Test Indexes Indexes
*

*>
*

*> Obs 150 LR chi2 17.11 R2 0.191 C 0.763
*

*> 0 128 d.f. 1 g 1.209 Dxy 0.526
*

*> 1 22 Pr(> chi2) <0.0001 gr 3.350 gamma 0.528
*

*> max |deriv| 1e-11 gp 0.129 tau-a 0.132
*

*> Brier 0.111
*

*>
*

*> Coef S.E. Wald Z Pr(>|Z|)
*

*> Intercept -5.0059 0.9813 -5.10 <0.0001
*

*> x 0.5647 0.1525 3.70 0.0002
*

*>
*

*> As you can see, the odds ratio for x is exp(0.5647)=1.75892.
*

*>
*

*> But if I run the following using summary():
*

*>
*

*>
*

*> What are these output? none of the numbers is the odds ratio (1.75892)
*

*> that I
*

*> calculated by using exp().
*

*>
*

*> Can any explain?
*

*>
*

*> Thanks
*

*>
*

*> John
*

*> [[alternative HTML version deleted]]
*

*>
*

*> ______________________________________________
*

*> R-help_at_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.
*

*>
*

Frank Harrell

Department of Biostatistics, Vanderbilt University

Date: Wed, 18 May 2011 09:52:05 -0700 (PDT)

Why is a one unit change in x an interesting range for the purpose of estimating an odds ratio?

The default in summary() is the inter-quartile-range odds ratio as clearly
stated in the rms documentation.

Frank

array chip wrote:

*>
*

> Hi, I am trying to run a simple logistic regression using lrm() to

*> calculate a
**> odds ratio. I found a confusing output when I use summary() on the fit
**> object
**> which gave some OR that is totally different from simply taking
**> exp(coefficient), see below:
**>
*

>> dat<-read.table("dat.txt",sep='\t',header=T,row.names=NULL)

>> d<-datadist(dat) >> options(datadist='d') >> library(rms) >> (fit<-lrm(response~x,data=dat,x=T,y=T))

> Logistic Regression Model

>> summary(fit)

> Effects Response : response

>> Factor Low High Diff. Effect S.E. Lower 0.95 Upper 0.95> x 3.9003 6.2314 2.3311 1.32 0.36 0.62 2.01> Odds Ratio 3.9003 6.2314 2.3311 3.73 NA 1.86 7.49

Frank Harrell

Department of Biostatistics, Vanderbilt University

-- View this message in context: http://r.789695.n4.nabble.com/logistic-regression-lrm-output-tp3533223p3533278.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help_at_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.Received on Wed 18 May 2011 - 17:37:07 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Wed 18 May 2011 - 17:40:07 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*