Sim5 Co-occurrence Randomization Algorithm

Share:

Description

Randomizes a binary matrix speciesData by reshuffling elements within each column. Sampling weights for each row are proportional to row sums. Makes a call to the vector_sample function.

Usage

1
sim5(speciesData)

Arguments

speciesData

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

Details

This algorithm preserves differences among sites in species richness, but assumes differences among species in commonness and rarity are proportional to observed species occurrences (= row sums).

Value

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

Note

This algorithm preserves differences among sites in species richness (= colsums), but assumes differences among species in commonness and rarity are proportional to observed species occurrences (= rowsums). sim5 has a high frequency of Type I errors with random matrices, so it is not recommended for co-occurrence analysis.

References

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

Examples

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.