16. Multinomial Logit#
Contributed by Jason Naramore.
Multinomial logit models are a generalization of logistic regression when there are more than 2 categories in the response. If there are \(n\) categories, the multinomial logit model is:
The second parameter in the Multinomial distribution is the number of trials, which is \(n = 1\) in the case of Multinomial logit.
For example, the \(i\)th response could be \(y_i = (0,0,0,1,0)\), meaning the 4th category is true, and categories 1, 2, 3, and 5 are false. The notation would be:
similar to the probability \(p\) in a logistic regression for predicting category 1 over category 0, a vector of probabilities \(p = (p_1, p_2, ... , p_K)\) is produced in the Multinomial logit model. In order to do this, the liniear combination of \(\beta\) coefficients and \(x\) predictors are calculated for each category into \(\eta\), and the \(\eta\)’s are normalized so that the sum of \(p's\) equals 1:
so there is a \(\beta\) coefficient for each category \(k\) and each \(x\) predictor \(i\). To put it all together, the Bayesian model is: