community.sync {synchrony} | R Documentation |
Compute community-wide synchrony and its significance via Monte Carlo randomizations
Description
Compute community-wide synchrony and its the significance via Monte Carlo randomizations. If all species fluctuate in perfect unison, the community-wide synchrony will be 1. If species undergo uncorrelated fluctuations, the community-wide synchrony will be 1/S. The Monte Carlo randomizations are performed by shuffling the columns of the community matrix independently. This function also returns the mean correlation between the columns of the matrix.
Usage
community.sync (data, nrands = 0, method = c("pearson", "kendall", "spearman"),
alternative = c("greater", "less"), type = 1, quiet = FALSE, ...)
Arguments
data |
community matrix in wide format where each row contains the abundance at each time step and each column corresponds to a different species. |
nrands |
number of randomizations to perform (default is 0) |
method |
Method to compute mean correlation between columns?
Options include |
alternative |
Alternative hypothesis. Options are
|
type |
Randomization method. The |
quiet |
Suppress progress bar when set to |
... |
Other parameters to |
Details
Loreau and de Mazancourt (2008) show that community-wide synchrony \varphi
can be quantified
by computing the temporal variance \sigma_{x_T}^2
of the community time series
x_T(t)=\sum{x_i(t)}
and the sum of the temporal standard deviation of the time series
across all species \left(\sum{\sigma_{x_i}}\right)^2
such that:
\varphi=\frac{\sigma_{x_T}^2}{\left(\sum{\sigma_{x_i}}\right)^2}
Value
Returns a named list containing:
obs |
the observed community synchrony |
meancorr |
the mean correlation between the columns of the matrix |
rands |
the community synchrony value the randomizations.
This variable is only returned if |
pval |
p-value of observed community synchrony.
This variable is only returned if |
alternative |
Alternative hypothesis. This variable is only returned if |
Author(s)
Tarik C. Gouhier (tarik.gouhier@gmail.com)
References
Loreau, M., and C. de Mazancourt. 2008. Species synchrony and its drivers: Neutral and nonneutral community dynamics in fluctuating environments. The American Naturalist 172:E48-E66.
Purves, D. W., and R. Law. 2002. Fine-scale spatial structure in a grassland community: quantifying the plant's eye view. Journal of Ecology 90:121-129.
Examples
# Community matrix for 20 species undergoing random fluctuations
comm.rand=matrix(runif(100), nrow=5, ncol=20)
community.sync(comm.rand, nrands=20)$pval
# Community matrix for 20 species undergoing synchronized fluctuations
comm.corr=matrix(rep(comm.rand[,1], 20), nrow=5, ncol=20)
community.sync(comm.corr, nrands=20)$pval
# On "real" data
data(bird.traits)
community.sync(bird.traits, nrands=20)$pval