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
lrm(formula = response ~ x, data = dat, x = T, y = T)
Model Likelihood DiscriminationRank Discrim.
Ratio TestIndexes Indexes
Obs 150LR chi2 17.11R2 0.191C 0.763
0128d.f. 1g1.209Dxy 0.526
1 22Pr( chi2) 0.0001gr 3.350gamma 0.528
max |deriv| 1e-11 gp 0.129tau-a 0.132
Brier0.111
CoefS.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 LowHigh 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@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
--
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@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.