Simple logistic regression

Similar documents
ST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses

Logistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression

Count data page 1. Count data. 1. Estimating, testing proportions

You can specify the response in the form of a single variable or in the form of a ratio of two variables denoted events/trials.

STA6938-Logistic Regression Model

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3

SAS Analysis Examples Replication C8. * SAS Analysis Examples Replication for ASDA 2nd Edition * Berglund April 2017 * Chapter 8 ;

Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:

ssh tap sas913, sas

Multinomial Logistic Regression Models

Longitudinal Modeling with Logistic Regression

COMPLEMENTARY LOG-LOG MODEL

CHAPTER 1: BINARY LOGIT MODEL

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

STAT 7030: Categorical Data Analysis

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).

Correlation and the Analysis of Variance Approach to Simple Linear Regression

Hierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture!

MSUG conference June 9, 2016

Models for Binary Outcomes

Model Based Statistics in Biology. Part V. The Generalized Linear Model. Chapter 18.1 Logistic Regression (Dose - Response)

EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).

ECONOMETRICS II TERM PAPER. Multinomial Logit Models

Q30b Moyale Observed counts. The FREQ Procedure. Table 1 of type by response. Controlling for site=moyale. Improved (1+2) Same (3) Group only

Generalized linear models

Simple linear regression

Chapter 6. Logistic Regression. 6.1 A linear model for the log odds

Logistic regression analysis. Birthe Lykke Thomsen H. Lundbeck A/S

Chapter 5: Logistic Regression-I

Maximum-Likelihood Estimation: Basic Ideas

Logistic Regression Analysis

Section 9c. Propensity scores. Controlling for bias & confounding in observational studies

Binary Logistic Regression

Generalized linear models for binary data. A better graphical exploratory data analysis. The simple linear logistic regression model

Homework Solutions Applied Logistic Regression

UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Applied Statistics Friday, January 15, 2016

ST3241 Categorical Data Analysis I Logistic Regression. An Introduction and Some Examples

Single-level Models for Binary Responses

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours

Investigating Models with Two or Three Categories

Sections 3.4, 3.5. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis

Logistic Regression Analyses in the Water Level Study

Cohen s s Kappa and Log-linear Models

Solutions for Examination Categorical Data Analysis, March 21, 2013

Categorical Predictor Variables

7.2 One-Sample Correlation ( = a) Introduction. Correlation analysis measures the strength and direction of association between

Regression Methods for Survey Data

9 Generalized Linear Models

Logistic Regression for Ordinal Responses

Testing Independence

Basic Medical Statistics Course

Exam Applied Statistical Regression. Good Luck!

Logistic Regression. Continued Psy 524 Ainsworth

Review. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis

Pubh 8482: Sequential Analysis

Chapter 9 Regression with a Binary Dependent Variable. Multiple Choice. 1) The binary dependent variable model is an example of a

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data

Appendix: Computer Programs for Logistic Regression

STAT 5500/6500 Conditional Logistic Regression for Matched Pairs

PubHlth Intermediate Biostatistics Spring 2015 Exam 2 (Units 3, 4 & 5) Study Guide

BIOSTATS Intermediate Biostatistics Spring 2017 Exam 2 (Units 3, 4 & 5) Practice Problems SOLUTIONS

LOGISTIC REGRESSION. Lalmohan Bhar Indian Agricultural Statistics Research Institute, New Delhi

jh page 1 /6

Clinical Trials. Olli Saarela. September 18, Dalla Lana School of Public Health University of Toronto.

STA441: Spring Multiple Regression. This slide show is a free open source document. See the last slide for copyright information.

Lab 11. Multilevel Models. Description of Data

Chapter 14 Logistic and Poisson Regressions

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

A Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46

Sections 4.1, 4.2, 4.3

ADVANCED STATISTICAL ANALYSIS OF EPIDEMIOLOGICAL STUDIES. Cox s regression analysis Time dependent explanatory variables

Lecture 10: Introduction to Logistic Regression

Generalized Linear Modeling - Logistic Regression

7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis

Introduction To Logistic Regression

SAS PROC NLMIXED Mike Patefield The University of Reading 12 May

UNIVERSITY OF TORONTO Faculty of Arts and Science

22s:152 Applied Linear Regression. Example: Study on lead levels in children. Ch. 14 (sec. 1) and Ch. 15 (sec. 1 & 4): Logistic Regression

BIOS 625 Fall 2015 Homework Set 3 Solutions

Transformations. 7.3 Extensions of Simple Linear Regression. β > 1 0 < β < 1. β < 0. Power Laws: Y = α X β X 4 X 1/2 X 1/3 X 3 X 1/4 X 2 X 1 X 1/2

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: )

STAT 525 Fall Final exam. Tuesday December 14, 2010

STA6938-Logistic Regression Model

MS&E 226: Small Data

Statistics Introductory Correlation

Weight of Evidence Coding and Binning of Predictors in Logistic Regression

Poisson Regression. The Training Data

ECLT 5810 Linear Regression and Logistic Regression for Classification. Prof. Wai Lam

Linear Regression Models P8111

Section IX. Introduction to Logistic Regression for binary outcomes. Poisson regression

Inference for Binomial Parameters

Logistic Regression 21/05

Lecture 12: Effect modification, and confounding in logistic regression

7.1, 7.3, 7.4. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis 1/ 31

PubH 7470: STATISTICS FOR TRANSLATIONAL & CLINICAL RESEARCH

An ordinal number is used to represent a magnitude, such that we can compare ordinal numbers and order them by the quantity they represent.

Generalized logit models for nominal multinomial responses. Local odds ratios

Stat 642, Lecture notes for 04/12/05 96

ij i j m ij n ij m ij n i j Suppose we denote the row variable by X and the column variable by Y ; We can then re-write the above expression as

Transcription:

Simple logistic regression Biometry 755 Spring 2009 Simple logistic regression p. 1/47 Model assumptions 1. The observed data are independent realizations of a binary response variable Y that follows a Bernoulli distribution. 2. The logit of Prob(Y =1 X) is linear in X. Simple logistic regression p. 2/47

IMPACT study Investigate the relationship between a subject s treatment randomization arm and the subject s ability to remain drug-free for 12 months. TREAT Treatment randomization assignment (0 = Short, 1 = Long) DFREE Remained drug free for 12 months (0 = No, 1 = Yes) Simple logistic regression p. 3/47 SAS code proc freq data = one; tables treat*dfree/missing; run; proc logistic data = one descending; class treat (param = ref ref = Long ); model dfree = treat; run; Simple logistic regression p. 4/47

Logistic output The LOGISTIC Procedure Model Information Data Set WORK.ONE Response Variable dfree Remained drug free for 12 months Number of Response Levels 2 Model binary logit Optimization Technique Fisher s scoring Number of Observations Read 575 Number of Observations Used 575 Simple logistic regression p. 5/47 Logistic output (cont.) Response Profile Ordered Total Value dfree Frequency 1 Remained drug free 147 2 Otherwise 428 Probability modeled is dfree= Remained drug free. Class Level Information Design Class Value Variables treat Long 1 Short 0 Simple logistic regression p. 6/47

Logistic output (cont.) Model Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Intercept Intercept and Criterion Only Covariates AIC 655.729 652.551 SC 660.083 661.259-2 Log L 653.729 648.551 Simple logistic regression p. 7/47 Logistic output (cont.) Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 5.1782 1 0.0229 Score 5.1626 1 0.0231 Wald 5.1266 1 0.0236 Simple logistic regression p. 8/47

Logistic output (cont.) Type 3 Analysis of Effects Wald Effect DF Chi-Square Pr > ChiSq treat 1 5.1266 0.0236 Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept 1-1.2978 0.1433 82.0211 <.0001 treat Long 1 0.4371 0.1931 5.1266 0.0236 Simple logistic regression p. 9/47 Logistic output (cont.) Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits treat Long vs Short 1.548 1.060 2.260 Simple logistic regression p. 10/47

Assessing significance of covariates For each covariate in the model, the output provides an estimated parameter, the standard error of that estimate, a test-statistic, and a p-value. One of the most common tests used to assess the significance of MLEs is the Wald test. The test associated with a single parameter is based on the following null hypothesis: H 0 : β j = 0 (all other βs are non-zero) H A : β j 0 (all other βs are non-zero) Simple logistic regression p. 11/47 Assessing significance of covariates (cont.) The Wald test is obtained by comparing the MLE of the slope parameter, ˆβ j, to an estimate of its standard error. The resulting ratio, under the hypothesis that β j =0, follows a standard normal distribution. That is ˆβ j ŜE( ˆβ j ) Normal(0, 1). Recall that the square of a Normal(0,1) random variable has a chi-square distribution with one degree of freedom. The SAS output (shown on Slide 9) provides the chi-square version of the Wald test along with corresponding p-values. We conclude that treatment arm is significantly associated with the probability of being drug free for 12 months (p =0.0236). Simple logistic regression p. 12/47

Interpreting model parameters Using the MLEs shown on Slide 9, the fitted model is [ ] Prob(DFREE =1 TREAT) ln 1 Prob(DFREE = 1 TREAT) = ˆβ 0 + ˆβ 1 TREAT = 1.2978 + 0.4371 TREAT How do we interpret these parameter estimates? Simple logistic regression p. 13/47 Interpreting model parameters (cont.) [ ] Prob(DFREE =1 TREAT) ln 1 Prob(DFREE = 1 TREAT) = 1.2978 + 0.4371 TREAT TREAT [ =0 (Short arm) ] ln Prob(DFREE Prob(DFREE = 1 TREAT=0) 1 = 1 TREAT=0) = 1.2978. In words, the log odds of remaining drug free for 12 months among subjects randomized to the short arm of the trial is -1.2978. Therefore, the odds of remaining drug free for 12 months among subjects randomized to the short arm of the trial is e 1.2978. =0.27. Simple logistic regression p. 14/47

Interpreting model parameters (cont.) [ ] Prob(DFREE =1 TREAT) ln 1 Prob(DFREE = 1 TREAT) = 1.2978 + 0.4371 TREAT TREAT [ =1 (Long arm) ] ln Prob(DFREE = 1 TREAT=1) 1 Prob(DFREE = 1 TREAT=1) = 1.2978 + 0.4371. The log odds of remaining drug free for 12 months among subjects randomized to the long arm of the trial is -1.2978 + 0.4371 = -0.8606. Therefore, the odds of remaining drug free for 12 months among subjects randomized to the long arm of the trial is e 0.8606. =0.42. Simple logistic regression p. 15/47 Comparing groups Usually we wish to compare the two groups using an odds ratio. Since we have the odds of remaining drug free for 12 months for each group, then it is a simple matter to construct the odds ratio. [ ] odds (DFREE = 1 TREAT = 1) ln = odds (DFREE = 1 TREAT = 0) ln(odds (DFREE = 1 TREAT = 1) ln(odds (DFREE = 1 TREAT = 0) = 0.8606 ( 1.2978) = 0.4372 Then e 0.4372. =1.55 there is a 55% increase in the odds of remaining drug free for 12 months for subjects in the long versus the short arm of the trial. Simple logistic regression p. 16/47

Useful laws of logarithms To construct the odds ratio comparing subjects in the long arm to those in the short arm, we relied upon a fundamental property of logarithms. Namely ( a ) log =loga log b. b This property will be essential to our ability to manipulate estimated βs to construct meaningful odds ratios. Simple logistic regression p. 17/47 Simple logistic with binary covariate For the logistic model with binary covariate X, [ ] Prob(Y =1 X) ln = β 0 + β 1 X 1 Prob(Y =1 X) β 0 + β 1 = log odds of the event when X =1. β 0 = log odds of the event when X =0. Then the log odds ratio of the event when X =1relative to X =0is the difference in the log odds (Slide 17). Since (β 0 + β 1 ) β 0 = β 1, then β 1 = log odds ratio of the event when X =1relative to when X =0. e β 1 = odds ratio of the event when X =1relative to when X =0. Simple logistic regression p. 18/47

Interpreting odds ratios Suppose an odds ratio compares group A (numerator) to group B (denominator). Then: An odds ratio between 0 and 1 is interpreted as a percent reduction in the odds of the event. For example, an odds ratio of 0.7 is interpreted as a 30% reduction in the odds of the event for those in group A relative to those in group B. An odds ratio between 1 and 2 is interpreted as a percent increase in the odds of the event. For example, an odds ratio of 1.6 is interpreted as a 60% increase in the odds of the event for those in group A relative to those in group B. Simple logistic regression p. 19/47 Interpreting odds ratios (cont.) An odds ratio greater than 2 is interpreted as a multiplicative increase in the odds of the event. For example, an odds ratio of 2.1 is interpreted as follows: The odds of the event for subjects in group A are approximately twice that of the subjects in group B. Simple logistic regression p. 20/47

OR confidence intervals Recall that the general form for a 95% confidence interval is ˆθ ± 1.96 ŜE(ˆθ). The formula for the confidence interval of the odds ratio follows this same structure. For the case where ÔR = e ˆβ j,an approximate 95% CI for the OR is e { ˆβ j ±1.96 SE( ˆβ j )}. Simple logistic regression p. 21/47 OR confidence intervals (cont.) On Slide 9, we saw that ˆβ TREAT. =0.4371 and ŜE( ˆβ TREAT ). =0.1931. Therefore, a 95% confidence interval for the odds ratio of DFREE for subjects in the long arm relative to those in the short arm (estimated on Slide 16), is e {0.4371±1.96 0.1931} =(e 0.058624,e 0.815576 ). =(1.06, 2.26). Fortunately, SAS provides estimated ORs and corresponding CIs by default for ORs of this form (i.e. those that are equivalent to e ˆβ j ). Compare our hand-calculated results with the output presented on Slide 10. Simple logistic regression p. 22/47

IMPACT example with polytomous covariate We now wish to investigate the relationship between a subject s IV drug use history and the subject s ability to remain drug-free for 12 months. Simple logistic regression p. 23/47 SAS code proc freq data = one; tables ivhx*dfree/missing; run; proc logistic data = one descending; class ivhx (param = ref ref = Never ); model dfree = ivhx; run; Simple logistic regression p. 24/47

Logistic output Class Level Information Design Class Value Variables ivhx Never 0 0 Previous 1 0 Recent 0 1 Simple logistic regression p. 25/47 Logistic output (cont.) Model Fit Statistics Intercept Intercept and Criterion Only Covariates AIC 655.729 646.376 SC 660.083 659.440-2 Log L 653.729 640.376 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 13.3525 2 0.0013 Score 13.4161 2 0.0012 Wald 13.1585 2 0.0014 Simple logistic regression p. 26/47

Logistic output (cont.) Type 3 Analysis of Effects Wald Effect DF Chi-Square Pr > ChiSq ivhx 2 13.1585 0.0014 Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept 1-0.6797 0.1417 22.9977 <.0001 ivhx Previous 1-0.4810 0.2657 3.2773 0.0702 ivhx Recent 1-0.7748 0.2166 12.7997 0.0003 Simple logistic regression p. 27/47 Type 3 analyses The Type 3 Analysis in the PROC LOGISTIC output (Slide 27) is akin to a multiple partial F-test from PROC REG. To review, a Type 3 analysis assesses the significance of the (complete) categorical (ordinal or nominal) variable, while adjusting for the presence of all other variables in the model. For class variables, you should always assess the overall significance of the covariate using a Type 3 analysis. The Wald tests presented under the heading of Analysis of Maximum Likelihood Estimates only assess the significance of the dummy variables constructed to fit the model. Simple logistic regression p. 28/47

The fitted model The fitted model is [ ] Prob(DFREE = 1 IVHX) ln 1 Prob(DFREE = 1 IVHX) = 0.6797 0.4810 IVHX (previous) 0.7748 IVHX (recent) Simple logistic regression p. 29/47 Interpreting model parameters The log odds of remaining drug free for 12 months for those with no history of IV drug use is -0.6797. The log odds of remaining drug free for 12 months for those with a previous history of IV drug use is -0.6797-0.4810 = -1.1607. The log odds of remaining drug free for 12 months for those with a recent history of IV drug use is -0.6797-0.7748 = -1.4545. Simple logistic regression p. 30/47

Interpreting model parameters (cont.) Using the property of logarithms from Slide 17, we can easily construct odds ratios. The log odds ratio of remaining drug free for 12 months for those with a previous history of IV drug use relative to those with no history of IV drug use is (-0.6797-0.4810) - (-0.6797) = -0.4810 the odds ratio of remaining drug free for 12 months for those with a previous history of IV drug use relative to those with no history of IV drug is e 0.4810. =0.62. There is a 38% reduction in the odds of remaining drug free for 12 months for those with a previous history of IV drug use relative to those with no history of IV drug. Simple logistic regression p. 31/47 Interpreting model parameters (cont.) The log odds ratio of remaining drug free for 12 months for those with a recent history of IV drug use relative to those with no history of IV drug use is (-0.6797-0.7748) - (-0.6797) = -0.7748 the odds ratio of remaining drug free for 12 months for those with a recent history of IV drug use relative to those with no history of IV drug is e 0.7748. =0.46. There is a 54% reduction in the odds of remaining drug free for 12 months for those with a recent history of IV drug use relative to those with no history of IV drug. Simple logistic regression p. 32/47

Default odds ratios and CIs in SAS The default output for SAS is to provide only those ORs and corresponding CIs that compare the groups represented by the dummy variables to the reference group. Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits ivhx Previous vs Never 0.618 0.367 1.041 ivhx Recent vs Never 0.461 0.301 0.704 Simple logistic regression p. 33/47 Summary of model parameters For the logistic model [ ] Prob(Y =1 X) ln 1 Prob(Y =1 X) = β 0 + β 1 X 1 + β 2 X 2 where X 1 and X 2 are dummy variables coded 0/1 representing groups one and two, respectively, for a three-level categorical covariate, Z, β 1 is the log odds ratio of the event for group 1 relative to the reference group e β 1 is the odds ratio of the event for group 1 relative to the reference group. β 2 is the log odds ratio of the event for group 2 relative to the reference group e β 2 is the odds ratio of the event for group 2 relative to the reference group. Simple logistic regression p. 34/47

Using a different reference group To obtain ORs and corresponding 95% CI in SAS using a different reference group, it is easiest to simply re-run PROC LOGISTIC and specify a different reference group. The code below identifies recent IV drug users as the reference group. proc logistic data = one descending; class ivhx (param = ref ref = Recent ); model dfree = ivhx; run; Simple logistic regression p. 35/47 Logistic output Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits ivhx Never vs Recent 2.170 1.420 3.318 ivhx Previous vs Recent 1.342 0.778 2.314 See if you can interpret these ORs. Simple logistic regression p. 36/47

IMPACT example with continuous covariate We now wish to investigate the relationship between a subject s number of prior drug treatments and the subject s ability to remain drug-free for 12 months. proc logistic data = one descending; model dfree = ndrugtx; run; Simple logistic regression p. 37/47 Logistic output Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept 1-0.7678 0.1303 34.7133 <.0001 ndrugtx 1-0.0749 0.0247 9.2203 0.0024 Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits ndrugtx 0.928 0.884 0.974 Simple logistic regression p. 38/47

Interpreting model parameters The fitted model is [ ] Prob(DFREE = 1 NDRUGTX) ln 1 Prob(DFREE = 1 NDRUGTX) = 0.7678 0.0749 NDRUGTX. Suppose you want to compare the odds of remaining drug free for 12 months for those with 10 prior treatments to those with 5 prior treatments. Simple logistic regression p. 39/47 Interpreting model parameters (cont.) The log odds of remaining drug free for 12 months among subjects with 10 prior drug treatments is 0.7678 0.0749 10 = 1.5168. The log odds of remaining drug free for 12 months among subjects with 5 prior drug treatments is 0.7678 0.0749 5 = 1.1423. The log odds ratio of remaining drug free for 12 months for subjects with 10 versus 5 prior drug treatments is 1.5168 1.1423 = 0.3745 The odds of remaining drug free for 12 months comparing those with 10 versus 5 prior drug treatments is e 0.3745. =0.69. Therefore, there is a 31% reduction in the odds of remaining drug free for 12 months comparing subjects with 10 prior drug treatments to those with 5 prior drug treatments. Simple logistic regression p. 40/47

Interpreting model parameters (cont.) The fitted model is [ ] Prob(DFREE = 1 NDRUGTX) ln 1 Prob(DFREE = 1 NDRUGTX) = 0.7678 0.0749 NDRUGTX. Suppose you want to compare the odds of remaining drug free for 12 months for those with 25 prior treatments to those with 20 prior treatments. Simple logistic regression p. 41/47 Interpreting model parameters (cont.) The log odds of remaining drug free for 12 months among subjects with 25 prior drug treatments is 0.7678 0.0749 25 = 2.6403. The log odds of remaining drug free for 12 months among subjects with 20 prior drug treatments is 0.7678 0.0749 20 = 2.2658. The log odds ratio of remaining drug free for 12 months for subjects with 25 versus 20 prior drug treatments is 2.6403 2.2658 = 0.3745 The odds of remaining drug free for 12 months comparing those with 25 versus 20 prior drug treatments is e 0.3745. =0.69. Therefore, there is a 31% reduction in the odds of remaining drug free for 12 months comparing subjects with 25 prior drug treatments to those with 20 prior drug treatments. Simple logistic regression p. 42/47

That s strange... Why did those odds ratios come out the same? Simple logistic regression p. 43/47 ORs when the covariate is continuous For the logistic model [ ] Prob(Y =1 X) ln 1 Prob(Y =1 X) = β 0 + β 1 X where X is a continuous covariate, let x 1 and x 2 be two specific values of the covariate X. (For example, if the covariate X is NDRUGTX, then x 1 might be 25 and x 2 might be 20.) Then... Simple logistic regression p. 44/47

ORs when the covariate is continuous (cont.) β 0 + β 1 x 1 is the log odds of Y =1for all subjects with covariate value x 1 so that the corresponding odds are e β 0+β 1 x 1 β 0 + β 1 x 2 are the log odds of Y =1for all subjects with covariate value x 2 so that the corresponding odds are e β 0+β 1 x 2. (β 0 + β 1 x 2 ) (β 0 + β 1 x 1 )=(x 2 x 1 )β 1 is the log odds ratio of Y =1for those with covariate value x 2 relative to those with covariate value x 1, so that the corresponding odds ratio is e (x 2 x 1 )β 1. Simple logistic regression p. 45/47 So why were the ORs the same? Based on the third bullet item from Slide 45, the OR depends on the difference between the two values of the covariate, not on their actual values. Since 10 and 5 prior drug treatments, and 25 and 20 prior drug treatments are both 5 units apart, the estimated OR comparing both pairs of subjects will be e 5 ˆβ 1 = e 5 0.0749 = e 0.3745. =0.69. Simple logistic regression p. 46/47

ORs and CIs in SAS for continuous covariate proc logistic data = one descending; model dfree = ndrugtx/clodds=wald; units ndrugtx = 5; run; Wald Confidence Interval for Adjusted Odds Ratios Effect Unit Estimate 95% Confidence Limits ndrugtx 5.0000 0.688 0.540 0.876 Simple logistic regression p. 47/47