# Binary logistic regression coefficients

Consider the following MWE example. A dataset with only one feature (categorical feature with 4 different categories ['cat', 'dog', 'hamster', 'frog']) + target (overall 10% positive class). After ohe and dropping one of the 4 resulting columns, e.g.,

is_cat    is_dog    is_hamster   Target
1          0          0           1
0          1          0           0
0          0          1           1
0          1          0           0
1          0          0           0
.
.
.
1           0          0           0


Let's suppose also that the average target for each category is 'cat':15%, 'dog':10%, 'hamster':8%. Now, consider a Logistic Regression $$log(\frac{p}{1-p}) = \beta_0 + \sum_i \beta_i x_i$$ fitted with the data above. The obtained estimates are:

$$\beta_0=-1.53$$, $$\beta_{dog}=-0.65$$, $$\beta_{cat}=-0.2$$, $$\beta_{hamster}=-0.9$$

However, I would expect the estimates on the log scale to be

negative for hamster (decrease the odds)
zero for dogs (no difference with the baseline)
positive for cats (increase the odds)


However, the 3 coefficients for the fitted curve show a negative sign, so either the approach or the interpretation is not correct. Is that the right way to interpret the coefficients?

• I assume you are talking about negative estimates on the log-odds scale? If you exponentiate them, you will get odds ratios, which should be easier to interpret. Commented Jun 1, 2021 at 18:25
• Exactly. Edited the question for clarity. I think the intercept term is the key here, since negative estimates on the log-odds scale will decrease the final predicted probability, but I noticed the sigmoid(intercept) does not correspond with the baseline. Is there a way of interpreting the sign of the estimates then? Commented Jun 1, 2021 at 18:29
• Perhaps if you could edit the question again and add the output from the model, it will be easier to help. Otherwise you try a search of this site for questions about interpreting logistic regression. Commented Jun 1, 2021 at 18:38
• Are there any cases that aren't dog, cat or hamster? You may be running into a problem otherwise. If all animals are cats, dogs or hamster, you only need two variables. What do you get if you remove is_dogfrom the model? Commented Jun 1, 2021 at 19:06
• Yes, there was a 4th category, which is not included here. Amended the question. Commented Jun 1, 2021 at 19:11