Data exploration

We collected three soil samples at 2, 5 and 8 meters of the 10-m-length transect. We did so for 62 vegetation transects done during spring 2022 and 2024.

From soil sampling, We measured the following soil physico-chemical variables:

Dataset features explained

  • wet and dry weight

  • ph

  • weight and volume of stones (v_stones) within the cylinders. We have the weight just for the soil sampling of 2024.

  • bulk.density : Soil bulk density (\(\frac{g}{cm^{3}}\))

  • depth : Soil depth (cm)

  • soil compaction : just for the soil sampling of 2024.

  • HCL Test :

    • Limestone : In cold condition, generalized effervescence under HCl

    • Dolomite : In cold condition, little or non effervescence under HCL

      • Four categories from 0 to 3 indicating effervescence under HCL

        • 0 : No detectable reaction

        • 1 : Weak, a few bubbles or murmur of effervescence

        • 2 : Medium, bubbles in continuous layer

        • 3 : Vivid, several superimposed layers of bubbles

  • Munsell soil colour :

    • hue : basic color

    • Chroma : the strength or weakness of a colour

    • Value : the lightness or the darkness of the colour

    • description color : name of the color

  • om : Percentage (%) of organic matter calculated after being in muffle furnace at 550 °C during 4 hours.

  • N : Percentage (%) of nitrogen in a sample weighing ~ 35 mg. CHN analysis.

  • C : Percentage (%) of carbon (organic + inorganic) in a sample weighing ~ 35 mg. CHN analysis.

For the statistical analysis we kept the variables that are presented in the following section.

Data summary of variable used in the statistics

Here we show the summary of the variables that were already averaged by replicates by transect. In brief, in the dataset we have 62 values of each soil variable.

Also we recorded litter, stones, rock and moss in the field along the vegetation transect.

##        ph         bulk_density      soil_depth      hcl_category   
##  Min.   :6.480   Min.   :0.5000   Min.   :  5.80   Min.   :0.0000  
##  1st Qu.:6.822   1st Qu.:0.9000   1st Qu.: 11.70   1st Qu.:0.0000  
##  Median :7.015   Median :1.0000   Median : 16.50   Median :0.7000  
##  Mean   :7.054   Mean   :0.9887   Mean   : 23.99   Mean   :0.6806  
##  3rd Qu.:7.265   3rd Qu.:1.1000   3rd Qu.: 25.45   3rd Qu.:1.0000  
##  Max.   :7.710   Max.   :1.6000   Max.   :101.00   Max.   :3.0000  
##      value             N                C                om        
##  Min.   :2.000   Min.   :0.1930   Min.   : 2.383   Min.   : 5.470  
##  1st Qu.:3.000   1st Qu.:0.3415   1st Qu.: 4.123   1st Qu.: 9.153  
##  Median :3.000   Median :0.4535   Median : 5.832   Median :11.521  
##  Mean   :3.319   Mean   :0.5059   Mean   : 6.538   Mean   :12.691  
##  3rd Qu.:4.000   3rd Qu.:0.7000   3rd Qu.: 8.231   3rd Qu.:17.019  
##  Max.   :5.700   Max.   :1.0970   Max.   :13.369   Max.   :26.191  
##     v_stones           lit             ston            rock       
##  Min.   :  1.00   Min.   : 4.00   Min.   : 0.00   Min.   : 0.000  
##  1st Qu.:  7.30   1st Qu.:14.00   1st Qu.:10.25   1st Qu.: 1.000  
##  Median : 10.85   Median :17.00   Median :14.50   Median : 4.000  
##  Mean   : 24.72   Mean   :18.94   Mean   :16.11   Mean   : 5.258  
##  3rd Qu.: 41.83   3rd Qu.:22.75   3rd Qu.:21.00   3rd Qu.: 9.000  
##  Max.   :123.70   Max.   :37.00   Max.   :42.00   Max.   :20.000  
##       moss       
##  Min.   : 0.000  
##  1st Qu.: 1.000  
##  Median : 3.500  
##  Mean   : 6.129  
##  3rd Qu.:10.500  
##  Max.   :24.000

Data visualization

Correlation matrix

Spearman correlation

##                 ph bulk_density soil_depth hcl_category value     N     C    om
## ph               1                                                             
## bulk_density  0.42            1                                                
## soil_depth    0.13        -0.04          1                                     
## hcl_category  0.48         0.34       0.01            1                        
## value         0.27         0.44       0.17          0.1     1                  
## N            -0.26        -0.49      -0.37        -0.01  -0.7     1            
## C             0.18         -0.2      -0.25         0.34 -0.26  0.63     1      
## om           -0.27        -0.53      -0.33        -0.06 -0.71  0.98  0.59     1
## v_stones     -0.03        -0.18      -0.32        -0.06 -0.03   0.2  0.21  0.16
## lit          -0.04        -0.07      -0.09        -0.21 -0.02 -0.05 -0.01 -0.07
## ston          0.26         0.17      -0.25         0.37  0.02  0.18  0.15  0.17
## rock          -0.3        -0.38       0.02        -0.43 -0.02  0.11 -0.07  0.12
## moss         -0.32        -0.44      -0.04        -0.39 -0.01  0.04 -0.08  0.08
##              v_stones   lit  ston rock moss
## ph                                         
## bulk_density                               
## soil_depth                                 
## hcl_category                               
## value                                      
## N                                          
## C                                          
## om                                         
## v_stones            1                      
## lit              0.03     1                
## ston             0.43 -0.34     1          
## rock             0.24  0.05 -0.14    1     
## moss              0.2  0.07  -0.3 0.26    1

Following criterion of |r| > 0.7 for avoid collinearity (Dormann et al. 2013), organic matter is highly correlated to Value and Nitrogen so we removed this variable for the multivariate analysis.

PCA of soil variables

# do not subset db to keep rownames 
soil_pca_1 <- rda(db_soil_22_24_q_tp_st, scale = TRUE) #scale=TRUE calls for a standardization of the variables
sum = summary(soil_pca_1) # Default scaling 2
sum$cont
## $importance
## Importance of components:
##                          PC1    PC2    PC3     PC4     PC5     PC6    PC7
## Eigenvalue            3.0426 2.2154 1.2884 1.12591 1.06890 0.86364 0.8064
## Proportion Explained  0.2536 0.1846 0.1074 0.09383 0.08908 0.07197 0.0672
## Cumulative Proportion 0.2536 0.4382 0.5455 0.63937 0.72844 0.80041 0.8676
##                           PC8     PC9    PC10    PC11     PC12
## Eigenvalue            0.51260 0.46479 0.26795 0.24024 0.103044
## Proportion Explained  0.04272 0.03873 0.02233 0.02002 0.008587
## Cumulative Proportion 0.91033 0.94906 0.97139 0.99141 1.000000

Principal component one explains 25.4%, component two explains 18.4%, and component three explains 10.7% of the variance.

library(tibble)
inv_scores = data.frame(soil_pca_1$CA$u)
inv_scores1 <- right_join(tibble::rownames_to_column(db_soil_22_24_q_tp_st), rownames_to_column(data.frame(inv_scores)), by = "rowname")
# add categories like common instead of df_grazing_ind_v2 and this code has sense. 
var_scores = data.frame(soil_pca_1$CA$v)
Variables and principal components 1-2

Variables and principal components 1-2

Transects and principal Components 1-2

Transects and principal Components 1-2

distance-based Redundancy Analysis (db-RDA): Modelling of soil variables and vegetation data

# similar of grazing_indicator rmd
# capscale() with raw (site by species) data (Borcard et al. 2018)
rda_22_24_soil <- capscale(community_data_density_22_23.72_sin_cus_filt ~ ph+ bulk_density+ soil_depth+ hcl_category+ value+ N+ C+ v_stones+ lit+ ston+ rock+ moss + Condition(scores(as.matrix(coord_22_23))), data =  db_soil_22_24_q_tp_st, distance = "bray",add = "lingoes")

#rda_22_24_soil$pCCA$tot.chi  #inertia of condition
#rda_22_24_soil$CCA$tot.chi   #Constrained inertia 

# Total variance explained by the model 
Tot.var <- rda_22_24_soil$tot.chi
# Constrained and unconstrained eigenvalues
eig.val <- c(rda_22_24_soil$CCA$eig, rda_22_24_soil$CA$eig) ## sum(eig.val)+1.133 (cond.) = 20.099 (tot.chi)
# Relative eigenvalues of Y-hat
eig.val.rel <- eig.val / Tot.var 
# Variability explained by the 1,2 and 3 of constrained RDA axes 
100*eig.val.rel[1:3] ## other way 100*rda_22_24_soil$CCA$eig[1:3]/Tot.var
##     CAP1     CAP2     CAP3 
## 6.212631 4.685372 3.220668
vif.cca(rda_22_24_soil) # vif below 10 so collinearity is avoided. 
## scores(as.matrix(coord_22_23))x scores(as.matrix(coord_22_23))y 
##                        2.260562                        2.466362 
##                              ph                    bulk_density 
##                        2.871942                        2.500640 
##                      soil_depth                    hcl_category 
##                        1.661522                        2.191023 
##                           value                               N 
##                        3.181044                        5.550705 
##                               C                        v_stones 
##                        3.240280                        1.541630 
##                             lit                            ston 
##                        1.420053                        2.242196 
##                            rock                            moss 
##                        1.648604                        1.572866
#Test the significance of the model
anova(rda_22_24_soil, by = "axis",permutations = how(nperm = 999)) 
## Permutation test for capscale under reduced model
## Forward tests for axes
## Permutation: free
## Number of permutations: 999
## 
## Model: capscale(formula = community_data_density_22_23.72_sin_cus_filt ~ ph + bulk_density + soil_depth + hcl_category + value + N + C + v_stones + lit + ston + rock + moss + Condition(scores(as.matrix(coord_22_23))), data = db_soil_22_24_q_tp_st, distance = "bray", add = "lingoes")
##          Df SumOfSqs      F Pr(>F)    
## CAP1      1   1.2487 4.2776  0.001 ***
## CAP2      1   0.9417 3.2260  0.009 ** 
## CAP3      1   0.6473 2.2175  0.194    
## CAP4      1   0.4555 1.5604  0.895    
## CAP5      1   0.3658 1.2532  0.997    
## CAP6      1   0.3440 1.1783  0.997    
## CAP7      1   0.3118 1.0682  0.997    
## CAP8      1   0.2658 0.9107  1.000    
## CAP9      1   0.1939 0.6644  1.000    
## CAP10     1   0.1712 0.5866  1.000    
## CAP11     1   0.1594 0.5459  1.000    
## CAP12     1   0.1406 0.4817  1.000    
## Residual 47  13.7198                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Figure: Species and varaibles

Figure: Species and varaibles

## 
## -----------------------------------------------------------------------
## Site constraints (lc) selected. To obtain site scores that are weighted
## sums of species scores (default in vegan), argument site.sc must be set
## to wa.
## -----------------------------------------------------------------------
Figure: Soil variables and vegetation transects. Angles between variables reflect their correlation

Figure: Soil variables and vegetation transects. Angles between variables reflect their correlation

CCA

Using the same dataset of the RDA but now doing a CCA.

# use raw data (Borcard et al. 2018)
# limits of cca https://uw.pressbooks.pub/appliedmultivariatestatistics/chapter/ca-dca-and-cca/
spe.cca <- cca(community_data_density_22_23.72_sin_cus_filt ~ ., db_soil_22_24_q_tp_st)
spe_cca_sum = summary(spe.cca) # Scaling 2 (default)

# Variability explained by axes 1, 2 and 3.
spe_cca_sum$cont$importance[,c(1:4)] 
##                            CCA1       CCA2       CCA3       CCA4
## Eigenvalue            0.2033229 0.14373978 0.12674846 0.10380807
## Proportion Explained  0.0575909 0.04071407 0.03590131 0.02940348
## Cumulative Proportion 0.0575909 0.09830497 0.13420628 0.16360976
# Unadjusted and adjusted R^2 - like statistics
RsquareAdj(spe.cca)
## $r.squared
## [1] 0.2686791
## 
## $adj.r.squared
## [1] 0.09015359
# ANOVA like permutation test for CCA to assess the significance of constraints.
anova(spe.cca, by = "axis",permutations = how(nperm = 999)) 
## Permutation test for cca under reduced model
## Forward tests for axes
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = community_data_density_22_23.72_sin_cus_filt ~ ph + bulk_density + soil_depth + hcl_category + value + N + C + v_stones + lit + ston + rock + moss, data = db_soil_22_24_q_tp_st)
##          Df ChiSquare      F Pr(>F)   
## CCA1      1   0.20332 3.8587  0.003 **
## CCA2      1   0.14374 2.7279  0.119   
## CCA3      1   0.12675 2.4055  0.225   
## CCA4      1   0.10381 1.9701  0.473   
## CCA5      1   0.07563 1.4354  0.955   
## CCA6      1   0.06828 1.2958  0.976   
## CCA7      1   0.05497 1.0432  0.999   
## CCA8      1   0.04868 0.9238  1.000   
## CCA9      1   0.03843 0.7294  1.000   
## CCA10     1   0.03421 0.6493  1.000   
## CCA11     1   0.03005 0.5703  1.000   
## CCA12     1   0.02069 0.3927  1.000   
## Residual 49   2.58191                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Sites and soil variables

Sites and soil variables

Species and soil variables

Species and soil variables

CCA uses chi-square distances which are particularly sensitive to or affected by rare species (Borcard et al. 2018). Note that we already removed species present in only one transect yet an option could be to remove also species present in very few transects.