06 May, 2022

Overview

Overview

Amalgamating

Amalgamating

Amalgomating

  • Species correlated - respond to same environmental gradients
  • Respond to multiple gradients
  • Represent high dimensional patterns in reduced dimensional space

Multivariate analyses

##     Sp1 Sp2 Sp3 Sp4 Sp5
## Q1    5  10  19   9   6
## Q2    5   9  19   9   6
## Q3    6  11  20  10   5
## Q4    5   9  20  10   5
## Q5    3   8  19   9   5
## Q6    4   9  19  10   5
## Q7    3   9  21  11   3
## Q8    4  10  19   9   5
## Q9    6  10  20  11   4
## Q10   5  10  19   9   6
  • Variables
  • Objects

Multivariate analyses

##     Sp1 Sp2 Sp3 Sp4 Sp5
## Q1    5  10  19   9   6
## Q2    5   9  19   9   6
## Q3    6  11  20  10   5
## Q4    5   9  20  10   5
## Q5    3   8  19   9   5
## Q6    4   9  19  10   5
## Q7    3   9  21  11   3
## Q8    4  10  19   9   5
## Q9    6  10  20  11   4
## Q10   5  10  19   9   6

GOALS

  • Data reduction
  • Represent multivariate patterns in reduced ordination space

Multivariate analyses

##     Sp1 Sp2 Sp3 Sp4 Sp5
## Q1    5  10  19   9   6
## Q2    5   9  19   9   6
## Q3    6  11  20  10   5
## Q4    5   9  20  10   5
## Q5    3   8  19   9   5
## Q6    4   9  19  10   5
## Q7    3   9  21  11   3
## Q8    4  10  19   9   5
## Q9    6  10  20  11   4
## Q10   5  10  19   9   6
  • R-mode
  • Q-mode

Multivariate analyses

Sites Sp1 Sp2 Sp3 Sp4 Sp5 Sp6 Sp7 Sp8 Sp9 Sp10
Site1 5 0 0 65 5 0 0 0 0 0
Site2 0 0 0 25 39 0 6 23 0 0
Site3 0 0 0 6 42 0 6 31 0 0
Site4 0 0 0 0 0 0 0 40 0 14
Site5 0 0 6 0 0 0 0 34 18 12
Site6 0 29 12 0 0 0 0 0 22 0
Site7 0 0 21 0 0 5 0 0 20 0
Site8 0 0 0 0 13 0 6 37 0 0
Site9 0 0 0 60 47 0 4 0 0 0
Site10 0 0 0 72 34 0 0 0 0 0

EDA

Transformations and Standardizations

Transformations and Standardizations

Site pH Slope Pressure Altitude Substrate
Site1 6.1 4.2 101325 2 Quartz
Site2 6.7 9.2 101352 510 Shale
Site3 6.8 8.6 101356 546 Shale
Site4 7.0 7.4 101372 758 Shale
Site5 7.2 5.8 101384 813 Shale
Site6 7.5 8.4 101395 856 Quartz
Site7 7.5 0.5 101396 854 Quartz
Site8 7.0 11.8 101370 734 Shale
Site9 8.4 8.2 101347 360 Quartz
Site10 6.2 1.5 101345 356 Quartz

Transformations

Presence/absence

library(vegan)
decostand(data[,-1], method="pa")
##        Sp1 Sp2 Sp3 Sp4 Sp5 Sp6 Sp7 Sp8 Sp9 Sp10
## Site1    1   0   0   1   1   0   0   0   0    0
## Site2    0   0   0   1   1   0   1   1   0    0
## Site3    0   0   0   1   1   0   1   1   0    0
## Site4    0   0   0   0   0   0   0   1   0    1
## Site5    0   0   1   0   0   0   0   1   1    1
## Site6    0   1   1   0   0   0   0   0   1    0
## Site7    0   0   1   0   0   1   0   0   1    0
## Site8    0   0   0   0   1   0   1   1   0    0
## Site9    0   0   0   1   1   0   1   0   0    0
## Site10   0   0   0   1   1   0   0   0   0    0

Standardizations

  • Maximum per column
Sites Sp1 Sp2 Sp3 Sp4 Sp5 Sp6 Sp7 Sp8 Sp9 Sp10
Site1 5 0 0 65 5 0 0 0 0 0
Site2 0 0 0 25 39 0 6 23 0 0
Site3 0 0 0 6 42 0 6 31 0 0
Site4 0 0 0 0 0 0 0 40 0 14
Site5 0 0 6 0 0 0 0 34 18 12
Site6 0 29 12 0 0 0 0 0 22 0
Site7 0 0 21 0 0 5 0 0 20 0
Site8 0 0 0 0 13 0 6 37 0 0
Site9 0 0 0 60 47 0 4 0 0 0
Site10 0 0 0 72 34 0 0 0 0 0

Standardizations

  • Maximum per column
library(vegan)
decostand(data[,-1], method="max")
##        Sp1 Sp2       Sp3        Sp4       Sp5 Sp6       Sp7   Sp8       Sp9
## Site1    1   0 0.0000000 0.90277778 0.1063830   0 0.0000000 0.000 0.0000000
## Site2    0   0 0.0000000 0.34722222 0.8297872   0 1.0000000 0.575 0.0000000
## Site3    0   0 0.0000000 0.08333333 0.8936170   0 1.0000000 0.775 0.0000000
## Site4    0   0 0.0000000 0.00000000 0.0000000   0 0.0000000 1.000 0.0000000
## Site5    0   0 0.2857143 0.00000000 0.0000000   0 0.0000000 0.850 0.8181818
## Site6    0   1 0.5714286 0.00000000 0.0000000   0 0.0000000 0.000 1.0000000
## Site7    0   0 1.0000000 0.00000000 0.0000000   1 0.0000000 0.000 0.9090909
## Site8    0   0 0.0000000 0.00000000 0.2765957   0 1.0000000 0.925 0.0000000
## Site9    0   0 0.0000000 0.83333333 1.0000000   0 0.6666667 0.000 0.0000000
## Site10   0   0 0.0000000 1.00000000 0.7234043   0 0.0000000 0.000 0.0000000
##             Sp10
## Site1  0.0000000
## Site2  0.0000000
## Site3  0.0000000
## Site4  1.0000000
## Site5  0.8571429
## Site6  0.0000000
## Site7  0.0000000
## Site8  0.0000000
## Site9  0.0000000
## Site10 0.0000000

Standardizations

  • Wisconsin double standardization
    Sites Sp1 Sp2 Sp3 Sp4 Sp5 Sp6 Sp7 Sp8 Sp9 Sp10
    Site1 5 0 0 65 5 0 0 0 0 0
    Site2 0 0 0 25 39 0 6 23 0 0
    Site3 0 0 0 6 42 0 6 31 0 0
    Site4 0 0 0 0 0 0 0 40 0 14
    Site5 0 0 6 0 0 0 0 34 18 12
    Site6 0 29 12 0 0 0 0 0 22 0
    Site7 0 0 21 0 0 5 0 0 20 0
    Site8 0 0 0 0 13 0 6 37 0 0
    Site9 0 0 0 60 47 0 4 0 0 0
    Site10 0 0 0 72 34 0 0 0 0 0
  • standardize columns (species) by maximum
  • standardize rows (sites) by totals

Standardizations

  • Wisconsin double standardization
library(vegan)
wisconsin(data[,-1])
##              Sp1       Sp2       Sp3        Sp4        Sp5     Sp6       Sp7
## Site1  0.4977203 0.0000000 0.0000000 0.44933078 0.05294896 0.00000 0.0000000
## Site2  0.0000000 0.0000000 0.0000000 0.12617043 0.30152049 0.00000 0.3633708
## Site3  0.0000000 0.0000000 0.0000000 0.03028155 0.32472135 0.00000 0.3633786
## Site4  0.0000000 0.0000000 0.0000000 0.00000000 0.00000000 0.00000 0.0000000
## Site5  0.0000000 0.0000000 0.1016401 0.00000000 0.00000000 0.00000 0.0000000
## Site6  0.0000000 0.3888889 0.2222222 0.00000000 0.00000000 0.00000 0.0000000
## Site7  0.0000000 0.0000000 0.3437500 0.00000000 0.00000000 0.34375 0.0000000
## Site8  0.0000000 0.0000000 0.0000000 0.00000000 0.12563421 0.00000 0.4542160
## Site9  0.0000000 0.0000000 0.0000000 0.33333333 0.40000000 0.00000 0.2666667
## Site10 0.0000000 0.0000000 0.0000000 0.58024691 0.41975309 0.00000 0.0000000
##              Sp8       Sp9      Sp10
## Site1  0.0000000 0.0000000 0.0000000
## Site2  0.2089382 0.0000000 0.0000000
## Site3  0.2816185 0.0000000 0.0000000
## Site4  0.5000000 0.0000000 0.5000000
## Site5  0.3023793 0.2910603 0.3049203
## Site6  0.0000000 0.3888889 0.0000000
## Site7  0.0000000 0.3125000 0.0000000
## Site8  0.4201498 0.0000000 0.0000000
## Site9  0.0000000 0.0000000 0.0000000
## Site10 0.0000000 0.0000000 0.0000000

Standardizations

  • Range
Site pH Slope Pressure Altitude Substrate
Site1 6.1 4.2 101325 2 Quartz
Site2 6.7 9.2 101352 510 Shale
Site3 6.8 8.6 101356 546 Shale
Site4 7.0 7.4 101372 758 Shale
Site5 7.2 5.8 101384 813 Shale
Site6 7.5 8.4 101395 856 Quartz
Site7 7.5 0.5 101396 854 Quartz
Site8 7.0 11.8 101370 734 Shale
Site9 8.4 8.2 101347 360 Quartz
Site10 6.2 1.5 101345 356 Quartz

Standardizations

  • Range
library(vegan)
enviro1 <- within(enviro, 
  Substrate <- as.numeric(Substrate))
decostand(enviro1[,-1], method="range")
##            pH      Slope  Pressure  Altitude Substrate
## 1  0.00000000 0.32743363 0.0000000 0.0000000         0
## 2  0.26086957 0.76991150 0.3802817 0.5948478         1
## 3  0.30434783 0.71681416 0.4366197 0.6370023         1
## 4  0.39130435 0.61061947 0.6619718 0.8852459         1
## 5  0.47826087 0.46902655 0.8309859 0.9496487         1
## 6  0.60869565 0.69911504 0.9859155 1.0000000         0
## 7  0.60869565 0.00000000 1.0000000 0.9976581         0
## 8  0.39130435 1.00000000 0.6338028 0.8571429         1
## 9  1.00000000 0.68141593 0.3098592 0.4192037         0
## 10 0.04347826 0.08849558 0.2816901 0.4145199         0

Standardizations

  • Center
Site pH Slope Pressure Altitude Substrate
Site1 6.1 4.2 101325 2 Quartz
Site2 6.7 9.2 101352 510 Shale
Site3 6.8 8.6 101356 546 Shale
Site4 7.0 7.4 101372 758 Shale
Site5 7.2 5.8 101384 813 Shale
Site6 7.5 8.4 101395 856 Quartz
Site7 7.5 0.5 101396 854 Quartz
Site8 7.0 11.8 101370 734 Shale
Site9 8.4 8.2 101347 360 Quartz
Site10 6.2 1.5 101345 356 Quartz

Standardizations

  • Center
library(vegan)
enviro1 <- within(enviro, 
  Substrate <- as.numeric(Substrate))
apply(enviro1[,-1],2,scale, scale=FALSE)
##          pH Slope Pressure Altitude Substrate
##  [1,] -0.94 -2.36    -39.2   -576.9      -0.5
##  [2,] -0.34  2.64    -12.2    -68.9       0.5
##  [3,] -0.24  2.04     -8.2    -32.9       0.5
##  [4,] -0.04  0.84      7.8    179.1       0.5
##  [5,]  0.16 -0.76     19.8    234.1       0.5
##  [6,]  0.46  1.84     30.8    277.1      -0.5
##  [7,]  0.46 -6.06     31.8    275.1      -0.5
##  [8,] -0.04  5.24      5.8    155.1       0.5
##  [9,]  1.36  1.64    -17.2   -218.9      -0.5
## [10,] -0.84 -5.06    -19.2   -222.9      -0.5

Standardizations

  • Standardize - scale
Site pH Slope Pressure Altitude Substrate
Site1 6.1 4.2 101325 2 Quartz
Site2 6.7 9.2 101352 510 Shale
Site3 6.8 8.6 101356 546 Shale
Site4 7.0 7.4 101372 758 Shale
Site5 7.2 5.8 101384 813 Shale
Site6 7.5 8.4 101395 856 Quartz
Site7 7.5 0.5 101396 854 Quartz
Site8 7.0 11.8 101370 734 Shale
Site9 8.4 8.2 101347 360 Quartz
Site10 6.2 1.5 101345 356 Quartz

Standardizations

  • Standardize - scale
library(vegan)
enviro1 <- within(enviro, 
   Substrate <- as.numeric(Substrate))
apply(enviro1[,-1],2,scale)
#OR
library(vegan)
decostand(enviro1[,-1], method="standardize")
##             pH      Slope   Pressure   Altitude  Substrate
## 1  -1.39885358 -0.6635569 -1.6862750 -2.0691070 -0.9486833
## 2  -0.50596832  0.7422840 -0.5248101 -0.2471164  0.9486833
## 3  -0.35715411  0.5735831 -0.3527412 -0.1179990  0.9486833
## 4  -0.05952568  0.2361813  0.3355343  0.6423593  0.9486833
## 5   0.23810274 -0.2136878  0.8517409  0.8396220  0.9486833
## 6   0.68454537  0.5173495  1.3249303  0.9938457 -0.9486833
## 7   0.68454537 -1.7038792  1.3679476  0.9866725 -0.9486833
## 8  -0.05952568  1.4733213  0.2494999  0.5562810  0.9486833
## 9   2.02387326  0.4611158 -0.7398962 -0.7851058 -0.9486833
## 10 -1.25003937 -1.4227110 -0.8259306 -0.7994522 -0.9486833