Schefferville - generalists/specialists; GAMS for 0.2 and 1.0 m2 plots

Author: Tammy L. Elliott

Date:December 21, 2015

R version 3.2.0

Show GAM results

0.2 m2 results

# First is for full data set, second is for <30my
summary(cooc.02.gam.sqrt.te)
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## cooc.02.z ~ te(phy.dist.sqrt, gen.spec.02)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  -0.1695     0.1006  -1.685   0.0926 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                                 edf Ref.df     F  p-value    
## te(phy.dist.sqrt,gen.spec.02) 4.964  5.656 5.192 5.72e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.0441   Deviance explained = 5.26%
## GCV = 5.7365  Scale est. = 5.6755    n = 561
summary(cooc.02.gam.30)
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## cooc.z.02.30 ~ te(phy.dist.30.sqrt, gen.spec.02.30)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  -0.6138     0.1840  -3.336  0.00114 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                                       edf Ref.df     F p-value  
## te(phy.dist.30.sqrt,gen.spec.02.30) 3.045  3.088 3.657  0.0138 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.0642   Deviance explained = 8.78%
## GCV = 4.2729  Scale est. = 4.1312    n = 122

1.0 m2 results

summary(cooc.gam.sqrt.te)
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## cooc.z ~ te(phy.dist.sqrt, gen.spec)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)   -0.158      0.115  -1.374     0.17
## 
## Approximate significance of smooth terms:
##                              edf Ref.df     F  p-value    
## te(phy.dist.sqrt,gen.spec) 5.323  6.052 7.363 1.23e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =   0.07   Deviance explained = 7.89%
## GCV = 7.5051  Scale est. = 7.4205    n = 561
summary(cooc.gam.30)
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## cooc.z.30 ~ te(phy.dist.30.sqrt, gen.spec.30)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  -0.6962     0.2253   -3.09  0.00249 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                                  edf Ref.df     F p-value  
## te(phy.dist.30.sqrt,gen.spec.30)   3      3 3.904  0.0106 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.0672   Deviance explained = 9.03%
## GCV = 6.4022  Scale est. = 6.1922    n = 122

Plot GAMS

# Top graphs are for 0.2m2 plots, whereas bottom are for 1.0m2 plots

#Plot four plots side-by-side
#dev.new(width=4.9, height=6)
#layout(matrix(1:4,ncol=2), width = c(1,1),height = c(1,1))
par(mfrow=c(2,2))
par(mar=c(3.5,3,2.75,0.75), mgp=c(1.5,0.3,0), las=0)

my.vis.gam(cooc.02.gam.sqrt.te, axes=FALSE, type="response", plot.type = "contour", color="gray",  main="", mgp=c(1.75,0.5,0),xlab="Phylogenetic distance (sqrt)",cex.main=0.1, lwd=2,cex.lab=1.15, cex=2, ylab="Difference in niche width", font.lab=1)
axis(1,  tck=0.025, cex.lab=1.25, cex.axis=1)
axis(2, tck=0.025,  cex.lab=1.25, cex.axis=1)
box(bty="o", lwd=2)

my.vis.gam(cooc.02.gam.30, axes=FALSE, type="response", plot.type = "contour", color="gray",  main="", mgp=c(1.75,0.5,0),xlab="Phylogenetic distance (sqrt)",cex.main=0.1, lwd=2,cex.lab=1.15, cex=2, ylab="Difference in niche width", font.lab=1)
axis(1,  tck=0.025, cex.lab=1.25, cex.axis=1)
axis(2, tck=0.025,  cex.lab=1.25, cex.axis=1)
box(bty="o", lwd=2)

my.vis.gam(cooc.gam.sqrt.te, axes=FALSE, type="response", plot.type = "contour", color="gray",  main="", mgp=c(1.75,0.5,0),xlab="Phylogenetic distance (sqrt)",cex.main=0.1, lwd=2,cex.lab=1.15, cex=2, ylab="Difference in niche width", font.lab=1)
axis(1,  tck=0.025, cex.lab=1.25, cex.axis=1)
axis(2, tck=0.025,  cex.lab=1.25, cex.axis=1)
box(bty="o", lwd=2)

my.vis.gam(cooc.gam.30, axes=FALSE, type="response", plot.type = "contour", color="gray",  main="", mgp=c(1.75,0.5,0),xlab="Phylogenetic distance (sqrt)",cex.main=0.1, lwd=2,cex.lab=1.15, cex=2, ylab="Difference in niche width", font.lab=1)
axis(1,  tck=0.025, cex.lab=1.5, cex.axis=1)
axis(2, tck=0.025,  cex.lab=1.5, cex.axis=1)
box(bty="o", lwd=2)

#textClick.bold("(a)", cex=1.25)
#textClick.bold("(b)", cex=1.25)
#textClick.bold("(c)", cex=1.25)
#textClick.bold("(d)", cex=1.25)