Schefferville - generalists/specialists; Hypervolume analyses

Includes 34 focal species (including T. alpinum)

Author: Tammy L. Elliott

Date:October 16, 2016

R version 3.1.0

GAMS

Full dataset

cooc.gam.sqrt.te<-gam(cooc.z~te(phy.dist.sqrt,gen.spec), dat=data.cooc)
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.1580     0.1184  -1.335    0.182
## 
## Approximate significance of smooth terms:
##                             edf Ref.df     F p-value  
## te(phy.dist.sqrt,gen.spec) 3.68  4.118 2.707  0.0284 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.0148   Deviance explained = 2.13%
## GCV = 7.9272  Scale est. = 7.8611    n = 561

GAM for only those species pairs <30my

cooc.gam.30<-gam(cooc.z.30~te(phy.dist.30.sqrt,gen.spec.30), dat=data.cooc.30)
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.2335  -2.982  0.00348 **
## ---
## 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 0.922   0.433
## 
## R-sq.(adj) =  -0.00194   Deviance explained = 2.29%
## GCV = 6.8764  Scale est. = 6.651     n = 122

Final GAM models for mean of hypervolume between two species

mean.cooc.gam.sqrt.te<-gam(cooc.z~te(mean.phy.dist.sqrt,gen.spec), dat=mean.data.cooc)
summary(mean.cooc.gam.sqrt.te)
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## cooc.z ~ te(mean.phy.dist.sqrt, gen.spec)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)  -0.1580     0.1183  -1.335    0.182
## 
## Approximate significance of smooth terms:
##                                 edf Ref.df     F p-value   
## te(mean.phy.dist.sqrt,gen.spec)   3      3 3.907 0.00884 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.0153   Deviance explained = 2.06%
## GCV = 7.9133  Scale est. = 7.8569    n = 561

GAM only those species pairs <30my; mean hypervolume

mean.cooc.gam.30<-gam(cooc.z~te(mean.phy.dist.30.sqrt,gen.spec), dat=mean.data.cooc.30)
summary(mean.cooc.gam.30)
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## cooc.z ~ te(mean.phy.dist.30.sqrt, gen.spec)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  -0.6962     0.2327  -2.992  0.00338 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                                    edf Ref.df     F p-value
## te(mean.phy.dist.30.sqrt,gen.spec)   3      3 1.193   0.315
## 
## R-sq.(adj) =  0.00477   Deviance explained = 2.94%
## GCV = 6.8304  Scale est. = 6.6064    n = 122

GAM plots

Vaules for absolute differences between species pairs on top, mean hypervolumes on bottom

```

Mantel and Partial mantels

Mantel tests for absolute differences between species pairs; partial mantel is first test

sedges.partial.mantel<-mantel.partial(phy.dist.cyp, hypervolume.matrix.abs, z.mat, method = "pearson", permutations = 999)
sedges.partial.mantel
## 
## Partial Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel.partial(xdis = phy.dist.cyp, ydis = hypervolume.matrix.abs,      zdis = z.mat, method = "pearson", permutations = 999) 
## 
## Mantel statistic r: 0.1167 
##       Significance: 0.082 
## 
## Upper quantiles of permutations (null model):
##   90%   95% 97.5%   99% 
## 0.107 0.142 0.187 0.275 
## Permutation: free
## Number of permutations: 999
sedges.phy.dist.mantel<-mantel(phy.dist.cyp, z.mat, method = "pearson", permutations = 999)
sedges.phy.dist.mantel
## 
## Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel(xdis = phy.dist.cyp, ydis = z.mat, method = "pearson",      permutations = 999) 
## 
## Mantel statistic r: 0.0957 
##       Significance: 0.003 
## 
## Upper quantiles of permutations (null model):
##    90%    95%  97.5%    99% 
## 0.0549 0.0675 0.0753 0.0827 
## Permutation: free
## Number of permutations: 999
sedges.gen.spec.mantel<-mantel(hypervolume.matrix.abs, z.mat,method = "pearson", permutations = 999)
sedges.gen.spec.mantel
## 
## Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel(xdis = hypervolume.matrix.abs, ydis = z.mat, method = "pearson",      permutations = 999) 
## 
## Mantel statistic r: -0.03259 
##       Significance: 0.781 
## 
## Upper quantiles of permutations (null model):
##    90%    95%  97.5%    99% 
## 0.0537 0.0688 0.0796 0.0909 
## Permutation: free
## Number of permutations: 999
#I don't think that this is possible for <30 my because not a symmetrical matrix

Mantel tests for mean differences between species pairs; partial mantel is first test

mean.sedges.partial.mantel<-mantel.partial(phy.dist.cyp, hypervolume.matrix.mean, z.mat, method = "pearson", permutations = 999)
mean.sedges.partial.mantel
## 
## Partial Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel.partial(xdis = phy.dist.cyp, ydis = hypervolume.matrix.mean,      zdis = z.mat, method = "pearson", permutations = 999) 
## 
## Mantel statistic r: 0.1811 
##       Significance: 0.074 
## 
## Upper quantiles of permutations (null model):
##   90%   95% 97.5%   99% 
## 0.162 0.198 0.222 0.272 
## Permutation: free
## Number of permutations: 999
mean.sedges.phy.dist.mantel<-mantel(phy.dist.cyp, z.mat, method = "pearson", permutations = 999)
mean.sedges.phy.dist.mantel
## 
## Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel(xdis = phy.dist.cyp, ydis = z.mat, method = "pearson",      permutations = 999) 
## 
## Mantel statistic r: 0.0957 
##       Significance: 0.005 
## 
## Upper quantiles of permutations (null model):
##    90%    95%  97.5%    99% 
## 0.0559 0.0678 0.0764 0.0874 
## Permutation: free
## Number of permutations: 999
mean.sedges.gen.spec.mantel<-mantel(hypervolume.matrix.mean, z.mat,method = "pearson", permutations = 999)
mean.sedges.gen.spec.mantel
## 
## Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel(xdis = hypervolume.matrix.mean, ydis = z.mat, method = "pearson",      permutations = 999) 
## 
## Mantel statistic r: -0.05621 
##       Significance: 0.872 
## 
## Upper quantiles of permutations (null model):
##    90%    95%  97.5%    99% 
## 0.0678 0.0840 0.1008 0.1173 
## Permutation: free
## Number of permutations: 999

Three way plot of mean differences between species pairs

Three way plot for species pairs <30 million years, mean difference between species pairs