Learn R Programming

rich (version 0.2)

c2cv: Comparison of 2 values of species richness using a randomization procedure

Description

Species richnesses are computed as the cumulative value over all samples. Richnesses are compared by mean of a randomization test without controlling for differences of sampling regime of communities density.

Usage

c2cv(com1,com2,nrandom=99,pr1=0.025,pr2=0.975,verbose=TRUE)

Arguments

com1
A first species-sample matrix (community 1). Rows correspond to samples whereas columns stand for species.
com2
A second species-sample matrix (community 2). Rows correspond to samples whereas columns stand for species.
nrandom
Number of randomizations to be performed. Default fixed to 99.
pr1
Lower probability level for quantile computations. Default fixed to 0.025.
pr2
Higher probability level for quantile computations. Default fixed to 0.975.
verbose
If verbose is TRUE c2cv returns a vector that contains the observed and randomized differences between richnesses.

Value

  • If verbose==TRUE c2cm returns a data frame and a vector with the randomized values. Otherwise, only the data frame is returned.
  • resA data frame with the outputs of the randomization test: cv1 Observed cumulative richness for community 1. cv2 Observed cumulative richness for community 2. cv1-cv2 Difference between observed cumulative richness of community 1 and community 2. p Probability of encountering such a value for cv1-cv2 (see details above). quantile for pr1 Quantile value for probability level pr1. quantile for pr2 Quantile value for probability level pr2. randomized cv1-cv2 Mean values of randomized and the observed values. nrandom Number of randomizations used in the test.
  • randA vector of nrandom+1 values corresponding to the observed difference of cv1-cv2 and the randomized values. rand is available if verbose == TRUE.

Details

If the observed richness for community 1 $\ge$ observed value for community 2, c2cv returns a probability p estimated as the number of randomizations for which the observed value for community 1 $\ge$ observed value for community 2 divided by the number of randomization + 1. Similarly, if the observed value for community 1 $\le$ observed value for community 2, p corresponds to the frequency of such situation in the randomizations.

References

Manly, B.F.J. (1997). Randomization and Monte Carlo methods in biology. Chapman & Hall.

See Also

c2rcv, c2m, rich

Examples

Run this code
data(efeb)
c2cv(com1=efeb$ef,com2=efeb$eb,nrandom=100,verbose=FALSE)

Run the code above in your browser using DataLab