Sim2 Co-occurrence Randomization Algorithm

Usage

sim2(speciesData)

Arguments

speciesData
binary presence-absence matrix (rows = species, columns = sites).

Value

Returns a binary presence-absence matrix with the same dimensions and rowsums as the input matrix.

Description

Randomizes a binary matrix speciesData by reshuffling elements within each row equiprobably.

Details

This algorithm assumes sites are equiprobable, but preserves differences among species (= row sums).

Note

This algorithm preserves differences in the commonness and rarity of species (= rowsums), but assumes that all sites are equiprobable. It would not be appropriate for islands that vary greatly in area, but it would be appropriate for quadrat censuses in a relatively homogeneous environment. sim2 can sometimes generate matrices with empty columns, but this is unlikely unless the matrix is very sparse. sim2 has good Type I error frequenceis when tested against random matrices. However, if sites do vary in their suitability or habitat quality, it will often identify aggregated patterns of species co-occurrence. sim2 and sim9 have the best overall performance for species co-occurrence analyses. However, because they differ in their assumptions about site quality, they often differ in their results, with sim9 often detecting random or segregated patterns for matrices in which sim2 detects aggregated patterns.

References

Gotelli, N.J. 2000. Null model analysis of species co-occurrence patterns. ecology 81: 2606-2621.

Examples

randomMatrix <- sim2(speciesData=matrix(rbinom(40,1,0.5),nrow=8))

See also

sim9 co-occurrence algorithm.