asim4: Resampling with occurrences and total abundance fixed

Description Usage Arguments Details Value References See Also Examples

View source: R/asim.R

Description

Randomizes an abundance matrix by assigning individuals to nonempty cells, with probabilities proportional to observed row and column abundance totals. Individuals are sequentially assigned to the matrix in this way until the total (original) matrix abundance is reached.

Usage

1
asim4(speciesData)

Arguments

speciesData

species-by-site abundance matrix

Details

Resamples total abundance conditional on marginal sums; equivalent to algorithm OS in Ulrich and Gotelli (2010), and to the Fortran subroutine oa in Ulrich (2008).

Preserves total matrix abundance and occurrences, but allows both species and site abundances (marginal sums) to vary in proportion to their original values.

Value

shuffled abundance matrix

References

Ulrich, W. 2008. Program Co-Occurrence. Version 1.

Ulrich, W. and Gotelli, N.J. 2010. Null model analysis of species associations using abundance data. Ecology 91:3384-3397.

See Also

Other abundance matrix null models: asim10_f(), asim10(), asim11_f(), asim11(), asim12_f(), asim12(), asim13_f(), asim13(), asim14_f(), asim14(), asim1_f(), asim1(), asim2_f(), asim2(), asim3_f(), asim3(), asim4_f(), asim5_f(), asim5(), asim6_f(), asim6(), asim7_f(), asim7(), asim8_f(), asim8(), asim9_f(), asim9()

Examples

1
2
amat <- rmat(20,12) # creates a random 20 x 12 abundance matrix
asim4(amat)         # performs proportional abundance resampling algorithm

irhoppe/cooccur documentation built on Jan. 1, 2021, 4:23 a.m.