Solved – Can one obtain a p-value for all levels of factor when doing a GLM

factor analysisgeneralized linear modelmultiple-comparisonsr

I have recently been criticized for using pairwise comparisons to explain all three levels of a factor within a negative binomial GLM rather than all levels at once. I was told that it is "long-winded" and "uneccessary". I was under the impression that in GLMs one cannot bulk all levels of a factor together to obtain a test statistic and corresponding p-value.

Obviously if a factor is "insignificant" at any level then carrying out a post-hoc analysis is pointless. My levels all have there own p-values therefore I discussed these values from the below global model. I was told to do an ANOVA instead which I don't believe is suitable for overdispersed, zero-inflated data.

p-value for all levels of a factor anyone?

(Below, lower field layer 0, upper field layer 1 and change1 is in intercept)

    Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.4284  -0.7956  -0.3862   0.4045   2.4233

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)                    4.3410884  1.8219786   2.383  0.01719 *
Height                         0.0373584  0.0119929   3.115  0.00184 **
Width                         -0.0007891  0.0008246  -0.957  0.33859
MeanMin                       -0.1731877  0.1404434  -1.233  0.21752
as.factor(Site_Treat)2        -0.4080256  0.2480438  -1.645  0.09998 .
as.factor(Change)2            -0.4940398  0.1755487  -2.814  0.00489 **
as.factor(Change)3            -0.1613766  0.1763677  -0.915  0.36019
as.factor(Lower_Field_Layer)1  0.4873488  0.2931585   1.662  0.09643 .
as.factor(Lower_Field_Layer)2 -0.3292409  0.3717863  -0.886  0.37585
as.factor(Upper_Field_Layer)2 -0.0081040  0.3257734  -0.025  0.98015
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for Negative Binomial(4.7795) family taken to be 1)

Null deviance: 96.392  on 46  degrees of freedom
Residual deviance: 47.968  on 37  degrees of freedom
AIC: 403.94


Best wishes,
Platypezid