I am currently analyzing the occupancy of bat boxes and the factors that are influencing the occupancy. To determine the most significant variables influencing the occupancy I am running a glm with occupancy as my response variable (0=occupied / 1=not occupied) and different explanatory variables which are numerical except one categorical variable.
On the one hand I have the p-values from the glm with the highest AIC and the lowest residual deviance, which is following model (I already dropped a few variables, such as height)
modelg <- glm(Occupancy ~ TreeCov5er + number_of_boxes + mounted_on, family = binomial(link="cloglog"))
that results in:
Estimate Std. Error z value Pr(>|z|) (Intercept) -4.97792 0.78083 -6.375 1.83e-10 *** TreeCover 0.03075 0.01074 2.864 0.004183 ** number_of_boxes 0.27427 0.07427 3.693 0.000221 *** mounted_onPOLES 2.54868 0.59730 4.267 1.98e-05 *** mounted_onBALCONY -12.44792 1146.20349 -0.011 0.991335 mounted_onFACADE 1.87433 0.50045 3.745 0.000180 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 184.60 on 177 degrees of freedom Residual deviance: 140.15 on 172 degrees of freedom AIC: 152.15 Number of Fisher Scoring iterations: 15
For all other variables which were dropped (e.g. Height) I have no p value. Would it be correct if I compute the p-value for height with:
modelhoehe <- glm(Besatz ~ Height, family = binomial(link="cloglog"))
Because now I would compare p-values from two different models. Is that correct. If not how can I compute the p-value for height?
I hope the question is understandable.