Short sea pen taxa~Class + Depth + I(Depth^2) + Block + Class:Depth + Depth:Block # Class + Depth + I(Depth^2) + Block + Class:Depth + Depth:Block tryCatch(taxa39.glm <- glm(taxa~Class + Depth + I(Depth^2) + Block + Class:Depth + Depth:Block, family=binomial(link="logit"), data=taxa.df), warning = function(x) { output.df[39,"flag"] <<- 1 }, finally = taxa39.glm <- glm(taxa~Class + Depth + I(Depth^2) + Block + Class:Depth + Depth:Block, family=binomial(link="logit"), data=taxa.df) ) summary(taxa39.glm) MODEL SUMMARY: ============== Call: glm(formula = sea_pen ~ factor(Class) + Depth + I(Depth^2) + factor(Block) + factor(Class):Depth + Depth:factor(Block), family = binomial(link="logit"), data = na.omit(d)) Deviance Residuals: Min 1Q Median 3Q Max -1.4645 -0.7480 -0.3860 0.9540 2.9356 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.138e+00 6.630e-01 -4.733 2.21e-06 *** factor(Class)2 -9.053e+00 3.949e+00 -2.293 0.0219 * factor(Class)3 -1.622e+01 1.872e+03 -0.009 0.9931 Depth 1.337e-01 2.207e-02 6.059 1.37e-09 *** I(Depth^2) -1.420e-03 1.907e-04 -7.446 9.63e-14 *** factor(Block)2 -4.692e-01 5.494e-01 -0.854 0.3930 factor(Block)3 -5.054e+00 9.788e-01 -5.163 2.43e-07 *** factor(Class)2:Depth 1.005e-01 4.916e-02 2.045 0.0409 * factor(Class)3:Depth -1.080e-02 3.493e+01 -0.000309 0.9998 Depth:factor(Block)2 2.188e-02 8.514e-03 2.570 0.0102 * Depth:factor(Block)3 9.206e-02 1.755e-02 5.246 1.56e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1097.53 on 922 degrees of freedom Residual deviance: 861.56 on 912 degrees of freedom AIC: 883.56 Number of Fisher Scoring iterations: 16 Analysis of Deviance Table Model: binomial, link: logit Response: sea_pen Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev NULL 922 1097.53 factor(Class) 2 63.96 920 1033.57 Depth 1 15.64 919 1017.93 I(Depth^2) 1 78.00 918 939.92 factor(Block) 2 44.71 916 895.21 factor(Class):Depth 2 6.68 914 888.53 Depth:factor(Block) 2 26.97 912 861.56 resample to 10 metersKrigsman, L.M., M.M. Yoklavich, E.J. Dick, and G.R. Cochrane (2012) Models and maps: predicting the distribution of corals and other benthic macro-invertebrates in shelf habitats. Ecosphere 3:1-16.