Test whether two species accumulation curves differ significantly.
Usage
compare(
x,
y,
method = c("permutation", "bootstrap", "auc"),
normalize = FALSE,
n_perm = 999L,
...
)Arguments
- x
A
spaccobject.- y
A
spaccobject.- method
Character. Comparison method:
"permutation"(default),"bootstrap", or"auc"(area under curve difference).- normalize
Logical. If
TRUE, each seed's curve is divided by its final value before computing AUC, so that curves are compared on a [0, 1] scale (proportion of total species). This compares the shape of accumulation rather than absolute species counts. DefaultFALSE.- n_perm
Integer. Number of permutations/bootstrap replicates. Default 999.
- ...
Additional arguments passed to comparison methods.
Value
An object of class spacc_comp containing:
- x_name, y_name
Names of compared objects
- auc_diff
Difference in area under curve
- p_value
P-value from permutation test
- saturation_diff
Difference in saturation points
- method
Comparison method used
- normalized
Whether curves were normalized before comparison
References
Colwell, R.K., Mao, C.X. & Chang, J. (2004). Interpolating, extrapolating, and comparing incidence-based species accumulation curves. Ecology, 85, 2717-2727.
Gotelli, N.J. & Colwell, R.K. (2011). Estimating species richness. In: Biological Diversity: Frontiers in Measurement and Assessment, pp. 39-54. Oxford University Press.