Resamples a community by Monte-Carlo simulations of a multinomial distribution and returns a vector of entropy values to calculate confidence intervals.

Usage

1
2

Arguments

FUN

The entropy function to be applied to each simulated community. May be any entropy function accepting a vector of species abundances, such as bcTsallis, bcShannon, bcSimpson or bcPhyloEntropy.

Simulations

The number of simulations to build confidence intervals.

Ns

A numeric vector containing species abundances.

BootstrapMethod

The method used to obtain the probabilities to generate bootstrapped communities from observed abundances. See rCommunity.

...

Additional arguments to be passed to FUN.

CheckArguments

Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Details

This function is used to obtain the distribution of entropy and eventually calculate confidence intervals. It draws simulated communities according to a multinomial distribution with the same number of individuals and probabilities as the actual community. It calculates the entropy of each simulated community. Last, it recenters the distribution of entropy values arounf the actual value of entropy according to Marcon et al. (2012): the estimation bias of simulated communities entropy can not be corrected analytically, but it does not affect the distribution shape.

Diversity can not be recentered this way so diversity function should not be used. Unexpected results will be obtained if inappropriate functions are used.

Value

A numeric vector containing the entropy value of each simulated community.