# Interpreting coefficients in a logistic regression model with a categorical variable having more than 2 levels

There is quite some content online interpreting odds in a logistic model with a dichotomous predictor. My problem is understanding coefficients when there are more than 2 levels for a categorical variable. How do you define the odds then?

Data:
X is a single categorical predictor with 4 levels: teenager, adult, mature, senior.
Y: 1=smoking, 0=non smoking.

LR:  We use n-1 dummy variables.
I chose adult as the reference bin as it had the highest concentration. (ok??)

________ | Intercepts   | p
teenager |    -0.32456  | 0
mature   |     1.45119  | 0
old      |    -0.9891   | 0


Interpreting the coefficients

Teenager: Teen is less likely to smoke (w.r.t adult?). In fact, a teen is 28% (exp-0.32456 -1) less likely to smoke THAN AN ADULT. Is odds of teenager smoking always mentioned against the reference group?

Mature: Matures is more to smoke (w.r.t adult?). In fact, a mature is 326% more likely to smoke THAN AN ADULT. Is odds of mature smoking always mentioned against the reference group?

If you write out the fitted model for the log odds of smoking

$$\log \frac{\Pr(Y=1)}{\Pr(Y=0)} = -4.380\,1 + -0.324\,56\ I_\mathrm{teen} + 1.451\,19 \ I_\mathrm{mature} + -0.989\,1\ I_\mathrm{old}$$

where the dummies are $$I_\mathrm{teen}=\left\{ \begin{array}{l l} 0 & X\neq\mathrm{teenager}\\ 1& X=\mathrm{teenager}\\ \end{array}\right.$$ &c., you can confirm your calculations. Note though that "likely" is ambiguous—it might be taken as referring to probability—& you might prefer to say something like "the odds of a teenager's smoking are 28% lower than those of an adult's smoking" in a formal or didactic context.

• Thanks Scortchi. There was also 1 more related Q in my post...How do I chose the predictor that will become my intercept? Some might say, it doesn't matter but here in LR, it does as all other 'exponentiated coefficients -1' will be compared to it. I don't want to chose ADULT as the reference bin as I want to show that smoking increases as TEENAGERS become ADULTS. For such a requirement, is it fine if I make TEENAGERS my intercept bin? This way if I get a positive coefficient for ADULTS, it helps me show that odds have increased. ADULTS bin has the highest observation count though. – Maddy Jun 11 '14 at 1:21
• You can choose any group as the reference category. The interpretation of individual coefficients changes, but the model as a whole is unaffected - it will have the same likelihood & make the same predictions. Note that whichever you choose you can still calculate differences in log odds between particular categories from the fitted model, but feel free to choose one where the coefficients immediately give quantities of interest. (I'd suggest you write out some different models to see this & confirm it using your statistical software.) – Scortchi - Reinstate Monica Jun 11 '14 at 6:44

It is important to understand that logistic regression parameters are only true locally. This means that the relative impact of each estimate will change depending on the value of your independent variables. Here is a paper that can helps explain things.

• Welcome to CV! Thanks for the paper: it's a clear exposition of how to interpret logits. But I couldn't understand your answer at all: perhaps you could explain a little more fully or add an example to illustrate it ... – Scortchi - Reinstate Monica Jun 5 '14 at 15:20

if $y = F(\beta x)$ and $y\: \epsilon\: (1,0)$ where $F(x)$ is a logit function then $dy/dx_1 \neq dy/dx_2$. This is because of the chain rule as $dy/dx = \frac{dy}{dF(x)}\frac{ dF(x)}{dx}$. If you look at a logit function

You will see that the slope of x changes depending on where you are on the curve. In practice this means that you only interpret rank and sign in a logistic regression as the magnitude of the impact will depend on how you parameters and variables interact with the logit function