ecospat.Cscore {ecospat}R Documentation

Pairwise co-occurrence Analysis with calculation of the C-score index.


The function tests for nonrandom patterns of species co-occurrence in a presence-absence matrix. It calculates the C-score index for the whole community and for each species pair. Null communities have column sum fixed.


ecospat.Cscore (data, nperm, outpath, verbose = FALSE)



A presence-absence dataframe for each species (columns) in each location or grid cell (rows). Column names (species names) and row names (sampling plots).


The number of permutation in the null model.


Path to specify where to save the results.


Boolean indicating whether to print progress output during calculation. Default is FALSE.


This function allows to apply a pairwise null model analysis (Gotelli and Ulrich 2010) to a presence-absence community matrix to determine which species associations are significant across the study area. The strength of associations is quantified by the C-score index (Stone and Roberts 1990) and a 'fixed-equiprobable' null model algorithm is applied. The format required for input databases: a plots (rows) x species (columns) matrix. Input matrices should have column names (species names) and row names (sampling plots). NOTE: a SES that is greater than 2 or less than -2 is statistically significant with a tail probability of less than 0.05 (Gotelli & McCabe 2002).


The function returns the C-score index for the observed community (ObsCscoreTot), p.value (PValTot) and standardized effect size (SES.Tot). It saves also a table in the working directory where the same metrics are calculated for each species pair (only the table with species pairs with significant p-values is saved in this version)


Christophe Randin and Manuela D'Amen <>


Gotelli, N.J. and D.J. McCabe. 2002. Species co-occurrence: a meta-analysis of JM Diamond's assembly rules model. Ecology, 83, 2091-2096.

Gotelli, N.J. and W. Ulrich. 2010. The empirical Bayes approach as a tool to identify non-random species associations. Oecologia, 162, 463-477

Stone, L. and A. Roberts, A. 1990. The checkerboard score and species distributions. Oecologia, 85, 74-79

See Also

ecospat.co_occurrences and ecospat.cons_Cscore


## Not run: 
data<- ecospat.testData[c(53,62,58,70,61,66,65,71,69,43,63,56,68,57,55,60,54,67,59,64)]
nperm <- 10000
outpath <- getwd()
Cscore<-ecospat.Cscore(data, nperm, outpath)

## End(Not run)

[Package ecospat version 3.2.2 Index]