S-PLUS : Copyright (c) 1988, 2003 Insightful Corp. S : Copyright Lucent Technologies, Inc. Professional Edition Version 6.2.1 for Microsoft Windows : 2003 Working data will be in C:\PROGRA~1\INSIGH~1\splus62\users\beckerbe > library(mass) > plot(may.3.dist,OB.Total) Problem: Object "may.3.dist" not found Use traceback() to see the call stack > attach(oct.07.subsite.dataset) Problem: Object "oct.07.subsite.dataset" not found Use traceback() to see the call stack > attach(Oct.07.subsite.dataset) > plot(may.3.dist,OB.Total) > cor.test(may.3.dist,OB.Total) Pearson's product-moment correlation data: may.3.dist and OB.Total t = -2.484, df = 102, p-value = 0.0146 alternative hypothesis: coef is not equal to 0 sample estimates: cor -0.2388315 > ob.test.nb<-glm(OB.Total~ + User interrupt requested > names(Oct.07.subsite.dataset) [1] "Date" "Year" "Year." [4] "SumMinusOB" "ENSO.YRS" "Oyster.1" [7] "OB.Tot.Sqrt" "A.Adult" "A.Pup" [10] "A1.Adult" "A1.Pup" "DBS.Adult" [13] "DBS.Pup" "DEM.Adult" "DEM.Pup" [16] "L.Adult" "L.Pup" "UEF.Adult" [19] "UEF.Pup" "UEN.Adult" "UEN.Pup" [22] "OB.Adult" "OB.Pup" "OB.Total" [25] "SumMinUEF" "UEN.Total" "UEF.Total" [28] "SumMinUEN" "OB.fit" "Year.1" [31] "OB.fit.exp" "UEF.fit" "LowerTot" [34] "Oyster.1.new" "SumMinOB.year" "Oyster.new" [37] "SumMinOB.UEF" "SumMinOB.UEF.year" "may.3.dist" > ob.test.nb<-glm(OB.Total~LowerTot+ENSO.YRS+Oyster.new+may.3.dist, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > ob.test2345.nb<-glm(OB.Total~LowerTot+ENSO.YRS+Oyster.new+may.3.dist, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > summary(ob.test2345.nb) Call: glm(formula = OB.Total ~ LowerTot + ENSO.YRS + Oyster.new + may.3.dist, family = negative.binomial(1), dataset = Oct.07.subsite.dataset) Deviance Residuals: Min 1Q Median 3Q Max -3.1057 -0.9182802 -0.2193906 0.3213022 1.656881 Coefficients: Value Std. Error t value (Intercept) 3.84353147982 5.024760e-001 7.64918495 LowerTot 0.00005255919 6.333360e-004 0.08298785 ENSO.YRS 0.25658316364 3.545719e-002 7.23642104 Oyster.new -0.00000238259 6.556412e-007 -3.63398420 may.3.dist -0.04473347844 2.158161e-002 -2.07275939 (Dispersion Parameter for Negative Binomial family taken to be 0.8441579 ) Null Deviance: 175.5106 on 103 degrees of freedom Residual Deviance: 133.1783 on 99 degrees of freedom Number of Fisher Scoring Iterations: 8 Correlation of Coefficients: (Intercept) LowerTot ENSO.YRS Oyster.new LowerTot -0.8730328 ENSO.YRS -0.0886494 -0.1727710 Oyster.new -0.3623999 0.2680772 -0.4255822 may.3.dist -0.7016466 0.4865765 -0.0142540 0.1361015 > plot.gam(ob.test2345.nb,se=T,resid=T) > ob.test234.nb<-glm(OB.Total~LowerTot+ENSO.YRS+Oyster.new, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > AIC(ob.test2345.nb,ob.test234.nb) df AIC ob.test2345.nb 6 332.2613 ob.test234.nb 5 333.4103 > ob.test345.nb<-glm(OB.Total~LowerTot+ENSO.YRS+Oyster.new+may.3.dist, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > AIC(ob.test2345.nb,ob.test234.nb,ob.test345.nb) df AIC ob.test2345.nb 6 332.2613 ob.test234.nb 5 333.4103 ob.test345.nb 6 332.2613 > ob.test345.nb<-glm(OB.Total~ENSO.YRS+Oyster.new+may.3.dist, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > AIC(ob.test2345.nb,ob.test234.nb,ob.test345.nb) df AIC ob.test2345.nb 6 332.2613 ob.test234.nb 5 333.4103 ob.test345.nb 5 330.2715 > ob.test45.nb<-glm(OB.Total~Oyster.new+may.3.dist, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > ob.test34.nb<-glm(OB.Total~ENSO.YRS+Oyster.new, family= negative.binomial(1),dataset=Oct.07.subsite.dataset) > AIC(ob.test2345.nb,ob.test234.nb,ob.test345.nb,ob.test45.nb,ob.test34.nb) df AIC ob.test2345.nb 6 332.2613 ob.test234.nb 5 333.4103 ob.test345.nb 5 330.2715 ob.test45.nb 4 351.2939 ob.test34.nb 4 332.1852 >