Last data update: 2014.03.03

R: Syncsa
syncsaR Documentation

Syncsa

Description

This function integrates several steps for the analysis of phylogenetic assembly patterns and their links to traits and ecological processes in a metacommunity (Pillar et al. 2009, Pillar & Duarte 2010). It requires data organized into the following matrices: (1) the presences or abundances of species in a set of communities (W); (2) the phylogenetic pairwise dissimilarities of these species (DF, in the range 0 to 1); (3) a set of functional traits describing the species (B), which may be a mixture of binary and quantitative traits (ordinal, interval, ratio scales), but not nominal ones (these should be expanded into binary traits); and (4) the ecological gradient of interest, which may be one or more factors to which the communities respond or ecosystem effects of the communities (E). The function computes several matrix correlations that express trait-convergence assembly patterns (TCAP), trait-divergence assembly patterns (TDAP), and phylogenetic signal in functional traits at the species pool level and at the metacomunity level. This function also generates P-values by permutation testing based on null models (Pillar et al. 2009, Pillar & Duarte 2010).

The function implement methods that have been available in the SYNCSA application written in C++ (by Valério Pillar, available at http://ecoqua.ecologia.ufrgs.br/ecoqua/SYNCSA.html).

Usage

syncsa(comm, traits, dist.spp, envir, method = "pearson", dist = "euclidean",
		scale = TRUE, scale.envir = TRUE, permutations = 999, na.rm = FALSE, 
		notification = TRUE)

Arguments

comm

Community data, with species as columns and sampling units as rows. This matrix can contain either presence/absence or abundance data.

traits

Matrix data of species described by traits, with traits as columns and species as rows.

dist.spp

Matrix containing phylogenetic distance between species. Must be a complete matrix (not a half diagonal matrix).

envir

Environmental variables for each community, with variables as columns and sampling units as rows.

method

Correlation method, as accepted by cor: "pearson", "spearman" or "kendall".

dist

Dissimilarity index, as accepted by vegdist: "manhattan", "euclidean", "canberra", "bray", "kulczynski", "jaccard", "gower", "altGower", "morisita", "horn", "mountford", "raup" , "binomial" or "chao". However, some of these will not make sense in this case.

scale

Logical argument (TRUE or FALSE) to specify if the traits are measured on different scales (Default Scale = TRUE). Scale = TRUE if traits are measured on different scales, the matrix T is subjected to standardization within each trait. Scale = FALSE if traits are measured on the same scale, the matrix T is not subjected to standardization. Furthermore, if Scale = TRUE the matrix of traits is subjected to standardization within each trait, and Gower Index is used to calculate the degree of belonging to the species, and if Scale = FALSE the matrix of traits is not subjected to standardization, and Euclidean distance is calculated to determine the degree of belonging to the species.

scale.envir

Logical argument (TRUE or FALSE) to specify if the environmental variables are measured on different scales (Default Scale = TRUE). If the enviromental variables are measured on different scales, the matrix is subjected to centralization and standardization within each variable.

permutations

Number of permutations in assessing significance.

na.rm

Logical argument (TRUE or FALSE) to specify if pairwise distances should be deleted in cases of missing observations (Default na.rm = FALSE).

notification

Logical argument (TRUE or FALSE) to specify if notification of missing observations should to be shown (Default notification = TRUE).

Details

ro(TE)

This matrix correlation refers to trait-convergence assembly patterns related to the ecological gradient (TCAP, Pillar et al. 2009). For evaluating TCAP, by matrix multiplication we define T = WB, which with previous standardization of W to unit column totals will contain the trait averages in each community. The elements in T are community weighted mean values or community functional parameters (Violle et al. 2007). Standardization of the traits (rows) in T is needed if the trait set contains traits measured with different scales. By using matrix correlation, we evaluate how the trait patterns in T are associated to ecological gradients in E. For relating T to E, we define a distance matrix of the communities (DT) using T, and another distance matrix of the community sites (DE) using E. The matrix correlation ro(TE) = ro(DT;DE) measures the level of congruence between TCAP and E. A strong correlation ro(TE) indicates the factors directly or indirectly represented in E are involved in ecological filtering of species that, at least for the traits considered in the analysis, consistently produce trait-convergence assembly patterns along the gradient comprising the metacommunity.

ro(XE) and ro(XE.T)

These matrix correlations refer to trait-divergence assembly patterns related to the ecological gradient (TDAP, Pillar et al. 2009). For the identification of TDAP, in a first step the species pairwise similarities (in the range 0 to 1) in matrix SB based on traits in B are used to define matrix U with degrees of belonging of species to fuzzy sets. By matrix multiplication X = WU will contain the species composition of the communities after fuzzy-weighting by their trait similarities (each row in X will refer to a species). Matrix X expresses both TCAP and TDAP (Pillar et al. 2009). By using matrix correlation, we evaluate how the trait patterns in X (TCAP and TDAP) are associated to ecological gradients in E. For relating X to E, we define a distance matrix of the communities (DX) using X, and another distance matrix of the community sites (DE) using E. The matrix correlation ro(XE) = ro(DX;DE) between X and E is defined. We then remove the trait-convergence component ro(TE) from ro(XE) by computing the partial matrix (Mantel) correlation ro(XE.T), which measures the level of congruence between TDAP and E. Trait-divergence assembly patterns (TDAP, Pillar et al. 2009) may result from community assembly processes related to biotic interactions (Stubbs & Wilson 2004; Wilson 2007).

ro(PE)

This matrix correlation refers to the phylogenetic structure related to the ecological gradient comprising the metacommunity. The phylogenetic pairwise dissimilarities in DF are transformed into similarities and used to define degrees of belonging qij to fuzzy sets. This is analogous to the definition of functional fuzzy sets (Pillar & Orlóci 1991; Pillar et al. 2009). Based on the phylogenetic similarities, every species i among s species in the metacommunity specifies a fuzzy set to which every species j (j = 1 to s species, including species i) belongs with a certain degree of belonging in the interval [0, 1]. In our definition, each row in matrix Q with the degrees of belonging must add to unit, i.e., the degrees of belonging of a given species across the fuzzy sets are standardized to unit total. By matrix multiplication P = WQ will contain the composition of the communities after fuzzy-weighting of species presences or abundances by the species' phylogenetic similarities. Each column in matrix P holds the phylogenetic structure of a community. The standardization of Q is essential for the community totals in each column in W remaining the same in P. Further, matrix W is adjusted to unit column totals prior to multiplication, so that the total richness or abundance within each community in W will be standardized. Matrix correlation ro(PE) = ro(DP;DE) measures the strength of the association between community distances based on their phylogenetic structure in DP and distances based on their ecological conditions (DE). Further, P can be explored for phylogenetic patterns at the metacommunity level by using, e.g., ordination techniques.

ro(PT) and ro(PX.T)

These matrix correlations measure phylogenetic signal at the metacommunity level related to TCAP and to TDAP. We define phylogenetic signal at the metacommunity level related to TCAP (PSMT) as the correlation between the phylogenetic structure described in matrix P and the trait-convergence structure described in matrix T. For this, a proper distance matrix (e.g. Euclidean distances) of communities (DP) is computed using P and another distance matrix of the same communities (DT) is computed using T. Then matrix correlation ro(PT) = ro(DP;DT) will measure the level of congruence between variation in P and T, which is a measure of PSMT. A strong phylogenetic signal at the metacommunity level is expected when communities that are more similar in terms of phylogenetic structure are also similar regarding their average trait values. We also define phylogenetic signal at the metacommunity level related to TDAP (PSMX.T) as the partial matrix correlation ro(PX.T) = ro(DP;DX.DT) between community distances DP computed on phylogenetic structure and community distances DX computed on species composition after fuzzy-weighting by the species‚ or trait similarities, removing the effect of TCAP (DT). This is analogous to TDAP.

ro(BF)

This matrix correlation measures phylogenetic signal at the species pool level (PSS, Pillar & Duarte 2010). We define PSS as the matrix correlation ro(FB) = ro(DF;DB) between species phylogenetic dissimilarities (already defined as matrix DF) and species trait dissimilarities (derived from already defined matrix SB) computed on any number of traits from matrix B. The species pool refers to the species present in the metacommunity.

Additional matrix correlations

The matrix correlations ro(TE.P) and ro(XE.P) are also computed, which may be useful for evaluating causal models in path analysis.

Testing against null models

All the matrix correlations are tested against null models. The null model is defined accoding to the correlation being tested. For ro(TE), each permutation generates a random matrix T calculated after the permutation among the species vectors in matrix B. For ro(XE) and ro(XE.T), each permutation generates a random matrix X after the permutation among species fuzzy sets (rows) in matrix U. For ro(PE), ro(PT), and ro(PX.T), each permutation generates a random matrix P after the permutation among species fuzzy sets (rows) in matrix Q. For ro(BF), a conventional Mantel test is performed with dissimilarity matrices DF and DB. Analogous null models are used for testing the additional matrix correlations; that is, the same null model for ro(TE) is used for ro(TE.P), the same model for ro(XE) is used for ro(XE.P).

Value

Correlations roTE, roXE, roPE, roPT, roPX.T, roXE.T, roTE.P, roXE.P and roBF, and their significance levels based on permutations.

Note

The function calculates the correlations despite the lack of one of the matrices, provided that community data had been entered. Correlations including unspecified matrices will appear with ro = 0.

IMPORTANT: The sequence of species in the community data matrix MUST be the same as that in the phylogenetic distance matrix and in traits matrix. Similarly, the sequence of communities in the community data matrix MUST be the same as that in the environmental data matrix. See organize.syncsa.

The functions ignore missing data when specified. In the case of direct multiplication of matrices (matrices W and matrix B) the missing data are replaced by 0, ignoring the cell with missing value. Result matrices are shown without missing values. Where the matrices are calculated using a dissimilarity index (matrix U and correlations between matrices) the missing data are ignored as in vegdist function. In some cases the dissimilarity matrices obtained by the function vegdist still contain some missing values. In these cases the rest of the procedure will be affected. In these cases you can find solutions in the package mice.

Author(s)

Vanderlei Júlio Debastiani <vanderleidebastiani@yahoo.com.br>

References

Pillar, V.D.; Duarte, L.d.S. (2010). A framework for metacommunity analysis of phylogenetic structure. Ecology Letters, 13, 587-596.

Pillar, V.D., Duarte, L.d.S., Sosinski, E.E. & Joner, F. (2009). Discriminating trait-convergence and trait-divergence assembly patterns in ecological community gradients. Journal of Vegetation Science, 20, 334–348.

Pillar, V.D. & Orlóci, L. (1991). Fuzzy components in community level comparisons. In: Computer Assisted Vegetation Analysis (eds Feoli, E. & Orlóci, L.). Kluwer, Dordrecht, pp. 87–93.

Stubbs, W.J. & Wilson, J.B. (2004). Evidence for limiting similarity in a sand dune community. Journal of Ecology, 92, 557–567.

Violle, C., Navas, M.L., Vile, D., Kazakou, E., Fortunel, C., Hummel, I. & Garnier, E. (2007). Let the concept of trait be functional! Oikos, 116, 882–892.

Wilson, J.B. (2007). Trait-divergence assembly rules have been demonstrated: limiting similarity lives! A reply to Grime. Journal of Vegetation Science, 18, 451–452.

See Also

matrix.t, matrix.x, matrix.p, optimal, belonging, organize.syncsa, rao.diversity

Examples

data(flona)
syncsa(comm=flona$community,traits=flona$traits,dist.spp=flona$phylo,envir=flona$environment)
syncsa(flona$community,traits=flona$traits,envir=flona$environment)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SYNCSA)
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-0
Loading required package: mice
Loading required package: Rcpp
mice 2.25 2015-11-09
Loading required package: FD
Loading required package: ade4

Attaching package: 'ade4'

The following object is masked from 'package:vegan':

    cca

Loading required package: ape
Loading required package: geometry
Loading required package: magic
Loading required package: abind
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SYNCSA/syncsa.Rd_%03d_medium.png", width=480, height=480)
> ### Name: syncsa
> ### Title: Syncsa
> ### Aliases: syncsa
> ### Keywords: SYNCSA
> 
> ### ** Examples
> 
> data(flona)
> syncsa(comm=flona$community,traits=flona$traits,dist.spp=flona$phylo,envir=flona$environment)
$Notes
            Correlation meanings                                                                                             
note.roTE   "Trait-convergence assembly patterns (TCAP): roTE"                                                               
note.roXE   "Both trait-convergence assembly patterns and trait-divergence assembly patterns: roXE"                          
note.roXE.T "Trait-divergence assembly patterns (TDAP): roXE.T"                                                              
note.roBF   "Phylogenetic signal at species level: roBF"                                                                     
note.roPE   "Correlation of phylogenetically structured assembly patterns to ecological variables: roPE"                     
note.roPT   "Correlation of phylogenetically structured assembly patterns to trait-convergence assembly patterns: roPT"      
note.roPX.T "Correlation of phylogenetically structured assembly patterns to trait-divergence assembly patterns: roPX.T"     
note.roTE.P "Removing phylogeny from trait-convergence assembly patterns: roTE.P"                                            
note.roXE.P "Removing phylogeny from both trait-convergence assembly patterns and trait-divergence assembly patterns: roXE.P"

$Statistics
       Obs          p    
roTE   -0.001189862 0.385
roXE   0.002011933  0.359
roPE   -0.1250556   0.932
roPT   0.1028319    0.623
roPX.T 0.08923735   0.266
roXE.T 0.006117411  0.333
roTE.P 0.01182486   0.477
roXE.P 0.0190078    0.416
roBF   -0.008630987 0.557

> syncsa(flona$community,traits=flona$traits,envir=flona$environment)
$Notes
            Correlation meanings                                                                                             
note.roTE   "Trait-convergence assembly patterns (TCAP): roTE"                                                               
note.roXE   "Both trait-convergence assembly patterns and trait-divergence assembly patterns: roXE"                          
note.roXE.T "Trait-divergence assembly patterns (TDAP): roXE.T"                                                              
note.roBF   "Phylogenetic signal at species level: roBF"                                                                     
note.roPE   "Correlation of phylogenetically structured assembly patterns to ecological variables: roPE"                     
note.roPT   "Correlation of phylogenetically structured assembly patterns to trait-convergence assembly patterns: roPT"      
note.roPX.T "Correlation of phylogenetically structured assembly patterns to trait-divergence assembly patterns: roPX.T"     
note.roTE.P "Removing phylogeny from trait-convergence assembly patterns: roTE.P"                                            
note.roXE.P "Removing phylogeny from both trait-convergence assembly patterns and trait-divergence assembly patterns: roXE.P"

$Statistics
       Obs          p    
roTE   -0.001189862 0.351
roXE   0.002011933  0.365
roPE   0            0    
roPT   0            0    
roPX.T 0            0    
roXE.T 0.006117411  0.289
roTE.P 0            0    
roXE.P 0            0    
roBF   0            0    

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>