Skip to content

Coefficients, OR and 95% CL

5 messages · Luciano La Sala, Jorge Ivan Velez, Nutter, Benjamin +2 more

#
Dear R-users,

After running a logistic regression, I need to calculate OR by exponentiating the coefficient, and then I need the 95% CL for the OR as well. For the following example (taken from P. Dalaagard's book), what would be the most straightforward method of getting what I need? Could anyone enlight me please?   

Thank you!
Lucho
Call:
glm(formula = menarche ~ age, family = binomial)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-4.68654  -0.13049  -0.01067   0.09608   2.35254  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept) -17.9175     1.7074  -10.49   <2e-16 ***
age           1.3549     0.1296   10.45   <2e-16 ***
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 974.31  on 703  degrees of freedom
Residual deviance: 223.95  on 702  degrees of freedom
  (635 observations deleted due to missingness)
AIC: 227.95

Number of Fisher Scoring iterations: 9
#
You might also consider

?confint

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Jorge Ivan Velez
Sent: Monday, September 22, 2008 5:36 PM
To: Luciano La Sala
Cc: R mailing list
Subject: Re: [R] Coefficients, OR and 95% CL

Dear Luciano,
See ?logistic.display in the epicalc package. If glm1 is your model,
something like

logistic.display(glm1)

should do the job.


HTH,


Jorge


On Mon, Sep 22, 2008 at 5:28 PM, Luciano La Sala
<luciano_la_sala at yahoo.com>wrote:

            
as
would
anyone
______________________________________________
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.


===================================

P Please consider the environment before printing this e-mail

Cleveland Clinic is ranked one of the top hospitals
in America by U.S. News & World Report (2008).  
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and
locations.


Confidentiality Note:  This message is intended for use\...{{dropped:13}}
#
l.mod<-glm(menarche~age,binomial)

you will get odds-ratios by exponentiating the coefficients of this 
model, so

exp(coef(l.mod))

will do this job. You may notice that this will produce an "OR" for the 
intercept part as well - which is not interpretable.
For the confidence intervals for this odds ratio you have to 
exponentiate the borders of the "standard" confidence intervals for the 
log-odds-ratios,

exp(confint(l.mod))

hth.

Luciano La Sala schrieb:

  
    
#
Eik Vettorazzi wrote:
The approach of anti-logging a coefficient only works in the simple case 
in which the variable is binary (or a one-unit change is of interest and 
the variable is linear), doesn't interact with another variable, and the 
reference cell desired equals the reference cell coded.

Frank