[R] logistic regression lrm() output

From: array chip <arrayprofile_at_yahoo.com>
Date: Wed, 18 May 2011 09:33:11 -0700 (PDT)


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
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():

> 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

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. Received on Wed 18 May 2011 - 16:34:52 GMT

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

All messages

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.

list of date sections of archive