# Calculating ORs for Specific Covariate Values, Logistic Regression in R

I'm new to logistic regression analysis, and was unable to find an answer elsewhere in Cross Validated or Stack Overflow.

Consider a standard logistic regression analysis of a binary outcome (admission to college) based on continuous covariates gre score and high school gpa, and ordinal categorical rank prestige of the undergraduate institution (data from the nice UCLA stats dept. logistic regression in R tutorial: http://www.ats.ucla.edu/stat/r/dae/logit.htm)

> admissions.data <- read.csv("http://www.ats.ucla.edu/stat/data/binary.csv")
> admissions.data$rank <- as.factor(admissions.data$rank)
Min.   :0.0000   Min.   :220.0   Min.   :2.260   1: 61
1st Qu.:0.0000   1st Qu.:520.0   1st Qu.:3.130   2:151
Median :0.0000   Median :580.0   Median :3.395   3:121
Mean   :0.3175   Mean   :587.7   Mean   :3.390   4: 67
3rd Qu.:1.0000   3rd Qu.:660.0   3rd Qu.:3.670
Max.   :1.0000   Max.   :800.0   Max.   :4.000

> fit1 <- glm(admit ~ gre + gpa + rank, data = admissions.data, family="binomial")
> summary(fit1)

Call:
glm(formula = admit ~ gre + gpa + rank, family = "binomial",

Deviance Residuals:
Min       1Q   Median       3Q      Max
-1.6268  -0.8662  -0.6388   1.1490   2.0790

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.989979   1.139951  -3.500 0.000465 ***
gre          0.002264   0.001094   2.070 0.038465 *
gpa          0.804038   0.331819   2.423 0.015388 *
rank2       -0.675443   0.316490  -2.134 0.032829 *
rank3       -1.340204   0.345306  -3.881 0.000104 ***
rank4       -1.551464   0.417832  -3.713 0.000205 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 499.98  on 399  degrees of freedom
Residual deviance: 458.52  on 394  degrees of freedom
AIC: 470.52

Number of Fisher Scoring iterations: 4

# Odds Ratios
> exp(coef(fit1))
(Intercept)         gre         gpa       rank2       rank3       rank4
0.0185001   1.0022670   2.2345448   0.5089310   0.2617923   0.2119375

# 95% confidence intervals
> exp(confint(fit1))
Waiting for profiling to be done...
2.5 %    97.5 %
(Intercept) 0.001889165 0.1665354
gre         1.000137602 1.0044457
gpa         1.173858216 4.3238349
rank2       0.272289674 0.9448343
rank3       0.131641717 0.5115181
rank4       0.090715546 0.4706961


My questions are:

1) In R, is there a straight-forward way to determine ORs with 95% CIs for specific values of the covariates? E.g., based on this model, what are the odds of college acceptance for students applying to a rank 2 schools with a gpa of 3 and a gre score of 750, compared with a student applying to a rank 3 school with the same gpa and gre score? I could calculate ORs by hand given the model coefficient estimates and these specific covariate values, but am unsure how to correctly propagate SEs to calculate 95% CIs.

2) Would this particular example be considered a case-control study design, and therefore odds ratios could be estimated, but not predictions? (See: Case-control study and Logistic regression)

• If anyone is going to be able to understand this without external links they will need to know the details of the study to which you refer. Jun 30, 2016 at 17:29

• @LorenzD The reviewer is right. You should never report the log of the odds ratios (which is what R gives you when you call coef or confint on a glm object of family binomial). Transforming these values is dead easy though, just take the exponent of their value. Jun 30, 2016 at 18:49