# Difficulty understanding contingency table and logistic regression coefficient

I have the following contingency table

      D    not-D
E     980    122
not-E 2420  6439


where D may stand for disease, and E for exposure.

This leads to the odds ratio (OR) $$\frac{odds(D|E)}{odds(D|\bar{E})} = 21.4$$

[1] I hope that is correct?

[2] This ratio says the odds of having D given E is about 21 times the odds of having D given you do not have E i.e. having E greatly increases the chance of D?

[3] Therefore, in a logistic regression where D is the response and where E is included (amongst several other predictors) as a binary predictor variable, with $$\bar{E}$$ as the reference level, I would expect its model coefficient to be positive, so that if E is present the odds of D is greater than if E is not present?

[4] The problem I have is that the model coefficient for E is negative which I interpret to mean having E reduces the odds of having D, which contradicts what I understand the OR is telling me?

EDIT:

Using R, with some variable name changes,

 fit <- glm(D ~ x1 + x2 + x3 + x4 + xE, family = binomial, data = df) 

• Welcome to CV, PM.! Can you edit your question to indicate your software and command for your logistic regression? – Alexis Sep 27 '18 at 16:40