Generalized logit models for nominal multinomial responses Categorical Data Analysis, Summer 2015 1/17 Local odds ratios Y 1 2 3 4 1 π 11 π 12 π 13 π 14 π 1+ X 2 π 21 π 22 π 23 π 24 π 2+ 3 π 31 π 32 π 33 π 34 π 3+ Odds of Y = 4versusY = 2 when X = 1is (π 14 /π 1+ ) / (π 12 /π 1+ )=π 14 /π 12 Odds of Y = 4versusY = 2 when X = 3is (π 34 /π 3+ ) / (π 32 /π 3+ )=π 34 /π 32 Local odds ratio = (π 14 /π 12 ) / (π 34 /π 32 )=(π 14 π 34 ) / (π 12 π 32 ) Interpretation: If local OR = 2, There is a two-fold increase in the odds of a response, Y, in class 4 versus class 2 when comparing X = 1toX = 3. 2/17
Multinomial regression models for nominal response Let Y be a categorical response variable with J categories (J > 2) We desire a model for multinomial responses similar to a logistic regression model Y could be the location of a colorectal tumor (proximal, distal or rectal) X could be the covariate classes defined by a subject s race (AA or non-aa) and gender (male or female) Let π j (x) =P(Y = j x) for some fixed setting of the x explanatory variables, with j π j(x) =1 At this fixed setting of x we treat the counts at the J categories of Y as multinomial with probabilities {π 1 (x),...,π J (x)}. 3/17 Baseline-category logits We select one of the J categories of Y as the baseline (or reference) category Without loss of generality, order the categories of Y so the Jth level coincides with this baseline category Define the generalized logit (relative to the baseline category) as [ ] g j (x) =log = α j + β jx, j = 1,...,J 1 π J (x) This model defines J 1 sets of model parameters, one for each of the J 1 generalized logits. Therefore, for each logit we have A separate intercept (α j ) A separate set of regression parameters (β j ) 4/17
Multinomial likelihood Consider subject i s contribution to the log-likelihood J L i = log π z ij ij π ij = P(Y i = j) z ij = 1ifY i = j and z ij = 0ifY i j z i =(z i1,...,z ij ) is a vector of a single 1 and the rest 0 L i = = = J z ij log π ij = z ij log π ij + z ij log π ij z ij log π ij + 1 z ij log π ij z ij log π ij π ij + log π ij 5/17 Multinomial likelihood (cont.) Conclusions: 1. The multinomial distribution is a member of the multivariate exponential dispersion family 2. The baseline-category logits are the natural parameters for the multinomial distribution 3. The baseline-category logit functions are the canonical link functions for the multinomial GLM 6/17
Inverting generalized logits to obtain probabilities Recall that for covariate pattern x, we define the generalized logit as [ ] g j (x) =log = α j + β jx, j = 1,...,J 1. π J (x) These can be solved for the individual π j (x) yielding (i) π j (x) = exp{g j (x)} P(Y = j x) = 1 + exp{g j(x)}, j = 1,...,J 1 (ii) π J (x) = 1 P(Y = J x) = 1 + exp{g j(x)} 7/17 Example Let Y be a three-level categorical variable with the third level identified as the reference category. g 1 (x) =α 1 + β 1 x g 2 (x) =α 2 + β 2 x There is no g 3 (x) - the third level of Y is the reference category. π 1 (x) = P(Y = 1 x) = exp{α 1 + β 1 x} 1 + exp{α 1 + β 1 x} + exp{α 2 + β 2 x} π 2 (x) = exp{α P(Y = 2 x) = 2 + β 2 x} 1 + exp{α 1 + β 1 x} + exp{α 2 + β 2 x} π 3 (x) = 1 P(Y = 3 x) = 1 + exp{α 1 + β 1 x} + exp{α 2 + β 2 x} 8/17
Consider Deriving probabilities log ( ) = α j + β j π J (x) x Exponentiating both sides, we get π j (x) ( ) π J (x) = exp α j + β j x which is the (local) odds for category j versus category J. Multiplying both sides by π J (x), we obtain ) π j (x) =π J (x) exp (α j + β j x (1), Now, sum both sides over j = 1,..., J 1, ) π j (x) =π J (x) exp (α j + β j x (2), 9/17 Note that Deriving probabilities (cont.) π J (x)+ π j (x) = J π j (x) =1 It follows that π j (x) =1 π J (x) (3) Based on (3), we can substitute 1 π J (x) for π j(x) in (2) on Slide 9, resulting in ) 1 π J (x) =π J (x) exp (α j + β j x (4) 10 / 17
Deriving probabilities (cont.) Rearranging terms in (4) on Slide 10, we have [ 1 = π J (x) 1 + ( )] exp α j + β j x Solving for π J (x), wehave π J (x) = Recalling (1) from Slide 9 1 1 + ( ) exp α j + β j x π j (x) =π J (x) exp (α j + β j x ), we substitute our expression for π J (x) into (1) to obtain ) exp (α j + β j x π j (x) = 1 + ( ) exp α j + β j x 11 / 17 Obtaining other odds ratios Note that the J 1 baseline-category logits uniquely determine all remaining logits comparing any two response levels Consider the logit for category j versus j where j j and j J log ( ) π j (x) ( ) = log log π J (x) ( ) πj (x) π J (x) = g j (x) g j (x) = (α j + β j x) (α j + β j x) 12 / 17
CRC tumor location example Y i = tumor location for ith colorectal cancer (CRC) patient (1 = proximal, 2 = distal, 3 = rectal) X 1i = race for ith CRC patient (1 = AA or 0 = non-aa) X 2i = gender for ith CRC patient (1 = male or 0 = female) Using rectal tumor location as the reference category, we fit the following generalized logits: g 1 (x i ) = α 1 + β 11 x 1i + β 12 x 2i g 2 (x i ) = α 2 + β 21 x 1i + β 22 x 2i For the jth logit (j = 1, 2) α j is the intercept β j1 is the effect of subject s race β j2 is the effect of subject s gender 13 / 17 CRC example: log odds proximal Covariate classes distal proximal rectal rectal distal AA Male α 1 + β 11 + α 2 + β 21 + (α 1 + β 11 + β 12 ) β 12 β 22 (α 2 + β 21 + β 22 ) Female α 1 + β 11 α 2 + β 21 (α 1 + β 11 ) (α 2 + β 21 ) non-aa Male α 1 + β 12 α 2 + β 22 (α 1 + β 12 ) (α 2 + β 22 ) Female α 1 α 2 α 1 α 2 14 / 17
CRC example: log odds ratios Calculate the log odds ratio for proximal versus rectal CRC comparing AAs to non-aas, controlling for subject s gender. log odds of proximal versus rectal CRC for AA males is α 1 + β 11 + β 12 log odds of proximal versus rectal CRC for non-aa males is α 1 + β 12 log odds ratio of proximal versus rectal CRC for AA males compared to non-aa males is β 11 Therefore, odds ratio of proximal versus rectal CRC for AA males compared to non-aa males is exp{β 11 } 15 / 17 CRC example: log odds ratios (cont.) Calculate the log odds ratio for proximal versus rectal CRC comparing AAs to non-aas, controlling for subject s gender. log odds of proximal versus rectal CRC for AA females is α 1 + β 11 log odds of proximal versus rectal CRC for non-aa females is α 1 log odds ratio of proximal versus rectal CRC for AA females compared to non-aa females is β 11 Therefore, odds ratio of proximal versus rectal CRC for AA females compared to non-aa females is exp{β 11 } 16 / 17
CRC example: log odds ratios (cont.) Not surprisingly, the odds ratios for proximal versus rectal CRC comparing AAs to non-aas was the same for males and females This is because there was no interaction in the model That is to say, we assume homogeneity of the local odds ratios Other ORs of interest can be calculated by exponentiating differences of appropriately selected log odds 17 / 17