> apprent.mod1 <- glm(apprentices ~ 1, family=poisson("log")) > summary(apprent.mod1) Call: glm(formula = apprentices ~ 1, family = poisson("log")) Deviance Residuals: Min 1Q Median 3Q Max -5.326 -4.589 -3.612 -1.476 28.674 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 2.65196 0.04622 57.37 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 1350.4 on 32 degrees of freedom Residual deviance: 1350.4 on 32 degrees of freedom AIC: 1446.8 Number of Fisher Scoring iterations: 6 > > apprent.mod2 <- glm(apprentices ~ distance+logpop+urban+direction, + family=poisson("log")) > summary(apprent.mod2) Call: glm(formula = apprentices ~ distance + logpop + urban + direction, family = poisson("log")) Deviance Residuals: Min 1Q Median 3Q Max -4.7326 -1.2122 -0.2589 1.8502 6.4246 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 1.334354 0.420763 3.171 0.00152 ** distance -0.032409 0.001844 -17.574 < 2e-16 *** logpop 1.061387 0.079851 13.292 < 2e-16 *** urban -0.027936 0.004052 -6.894 5.44e-12 *** direction2 0.103277 0.174946 0.590 0.55496 direction3 0.812827 0.142741 5.694 1.24e-08 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 1350.44 on 32 degrees of freedom Residual deviance: 212.46 on 27 degrees of freedom AIC: 318.8 Number of Fisher Scoring iterations: 6 > > anova(apprent.mod1, apprent.mod2, test="Chisq") Analysis of Deviance Table Model 1: apprentices ~ 1 Model 2: apprentices ~ distance + logpop + urban + direction Resid. Df Resid. Dev Df Deviance Pr(>Chi) 1 32 1350.44 2 27 212.46 5 1138 < 2.2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1