Skip to content
Prev 4746 / 7420 Next

Logistic regression with 2 categorical predictors

Hi Thierry,

The multiple comparisons ran just fine but there was a ridiculous amount of
interaction combinations all of which were non-significant even though
there was a highly significant interaction term. I decided to remove test
as a variable to simplify the analysis and run separate single explanatory
variable logistic regressions. I have included a result below which is
still producing an outcome I cant explain. Namely, why am I getting such a
significant result for the ANOVA but when I do the tukey tests nothing is
significant?
Age Prefer Avoid
1   1     17    14
2   2     20    10
3   3     14     9
4   4     13    12
5   5      0    18
6   6      0     5
family=binomial)
Analysis of Deviance Table

Model: binomial, link: logit

Response: cbind(Prefer, Avoid)

Terms added sequentially (first to last)


     Df Deviance Resid. Df Resid. Dev  Pr(>Chi)
NULL                     5     36.588
Age   5   36.588         0      0.000 7.243e-07 ***
Simultaneous Tests for General Linear Hypotheses

Multiple Comparisons of Means: Tukey Contrasts


Fit: glm(formula = cbind(Prefer, Avoid) ~ Age, family = binomial,
    data = sg_habitat)

Linear Hypotheses:
             Estimate Std. Error z value Pr(>|z|)
2 - 1 == 0     0.4990     0.5294   0.943    0.912
3 - 1 == 0     0.2477     0.5593   0.443    0.997
4 - 1 == 0    -0.1141     0.5390  -0.212    1.000
5 - 1 == 0   -25.8473 53178.5362   0.000    1.000
6 - 1 == 0   -24.7307 57729.9299   0.000    1.000
3 - 2 == 0    -0.2513     0.5767  -0.436    0.997
4 - 2 == 0    -0.6131     0.5570  -1.101    0.844
5 - 2 == 0   -26.3463 53178.5362   0.000    1.000
6 - 2 == 0   -25.2296 57729.9299   0.000    1.000
4 - 3 == 0    -0.3618     0.5855  -0.618    0.985
5 - 3 == 0   -26.0950 53178.5362   0.000    1.000
6 - 3 == 0   -24.9783 57729.9299   0.000    1.000
5 - 4 == 0   -25.7332 53178.5362   0.000    1.000
6 - 4 == 0   -24.6165 57729.9299   0.000    1.000
6 - 5 == 0     1.1167 78490.1364   0.000    1.000
(Adjusted p values reported -- single-step method)


On 21 October 2014 22:53, ONKELINX, Thierry <Thierry.ONKELINX at inbo.be>
wrote: