I have the folowing model:
mod.log.diab <- glm(data = data_train, INFEC ~ DIABETES, family = binomial(link = 'logit'))
This gives the folowing OR:
>exp(mod.log.diab$coefficients)
(Intercept) DIABETESno
2.826087 1.469822
This value is greater than 1 so we can say that the variable is significant. But when I apply a Wald test I get the folowing answer:
>regTermTest(mod.log.diab, "DIABETES")
Wald test for DIABETES
in glm(formula = INFEC ~ DIABETES, family = binomial(link = "logit"),
data = data_train)
F = 2.34702 on 1 and 1560 df: p= 0.12573
The pvalue is greater than 0.05 so we reject H0, the test says that is not significant.
How I have to interpret this, who has the truth OR or the test?
The question does not finish yet because if I upgrade the model with more explicative variables:
mod.log.cat <- glm(data = train.cat, INFEC ~ DIABETES + EDAD + HCTO, family = binomial(link = 'logit'))
I get the folowing OR:
>exp(mod.log.mult$coefficients)
(Intercept) DIABETESno EDAD HCTO
1.3275634 1.0751666 0.9817025 1.0558760
And the folowing Wald test output:
Wald test for EDAD
in glm(formula = INFEC ~ DIABETES + EDAD + HCTO, family = binomial(link = "logit"),
data = train.cat)
F = 18.90695 on 1 and 1558 df: p= 1.4615e-05
Wald test for DIABETES
in glm(formula = INFEC ~ DIABETES + EDAD + HCTO, family = binomial(link = "logit"),
data = train.cat)
F = 0.4122714 on 1 and 1558 df: p= 0.52091
Wald test for HCTO
in glm(formula = INFEC ~ DIABETES + EDAD + HCTO, family = binomial(link = "logit"),
data = train.cat)
F = 41.87676 on 1 and 1558 df: p= 1.2986e-10
This time DIABETES does not reject the wald test, like in the simple model. But the strange fact is all odd ratios are near similar, so they are near 1. What is the conclusion? How is possible with OR near to 1 some variabels are significant and others no?
Thanks.