c_score: CScore Co-occurrence Metric

Description Usage Arguments Details Value Note References Examples

View source: R/metrics.R

Description

Takes a binary presence-absence matrix and returns Stone and Roberts' (1990) C-score.

Usage

1
c_score(m = matrix(rbinom(100, 1, 0.5), nrow = 10))

Arguments

m

a binary presence-absence matrix in which rows are species and columns are sites.

Details

For each unique pair of species, the C-score is calculated as

C_ij = (R_i - S)(R_j - S)

where R_i and R_j are the row sums for species i and j, and S is the number of shared sites in which both species i and species j are present. For any particular species pair, the larger the C-score, the more segregated the pair, with fewer shared sites. However, the index can be difficult to interpret when calculated as a matrix-wide average, because a single matrix can contain individual pairs of species that are segregated, random, or aggregated.

Degenerate matrices result from simulations where a row or column sum may be 0. <nick can you fill in the implications as to what this means if they are included or not?>

Value

Returns the average C-score calculated across all possible species pairs in the matrix.

Note

The matrix-wide C-score is not calculated for missing species, so empty rows in the matrix do not affect the result.

References

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

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

Examples

1
obsCScore <- c_score(m=matrix(rbinom(100,1,0.5),nrow=10))

Example output

Loading required package: MASS

EcoSimR documentation built on May 2, 2019, 7:26 a.m.