Description Usage Arguments Value Author(s) References Examples
Compute mean column-wise correlation and determine its significance via Monte Carlo randomizations. The Monte Carlo randomizations are performed by shuffling the columns of the community matrix independently.
1 2 3 |
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) |
alternative |
Alternative hypothesis. Options include |
method |
Method to compute correlation? Options include |
type |
Randomization method. The |
quiet |
Suppress progress bar when set to |
... |
Other parameters to |
Returns a named list containing:
obs |
the observed mean correlation |
rands |
the mean correlation for each randomization.
This variable is only returned if |
pval |
p-value of observed mean correlation.
This variable is only returned if |
alternative |
Alternative hypothesis.
This variable is only returned if |
method |
Method used to compute the mean correlation. |
Tarik C. Gouhier (tarik.gouhier@gmail.com)
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.
1 2 3 4 5 6 7 8 9 | # Community matrix for 20 species undergoing random fluctuations
comm.rand=matrix(runif(100), nrow=5, ncol=20)
meancorr(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)
meancorr(comm.corr, nrands=20)$pval
# On "real" data
data(bird.traits)
meancorr(bird.traits, nrands=20)$pval
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.