Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/pruneindicators.r
This function allows reducing drastically the number of species combinations to be retained for a given target site group.
1 | pruneindicators(x, At=0, Bt=0, sqrtIVt=0, max.indicators=4, verbose=FALSE)
|
x |
An object of class ' |
At |
Threshold for positive predictive value. Combinations with lower values are not kept. |
Bt |
Threshold for sensitivity. Combinations with lower values are not kept. |
sqrtIVt |
Threshold for (square root of) indicator value. Combinations with lower values are not kept. |
max.indicators |
Maximum number of species combinations to be kept. If |
verbose |
If TRUE, prints the results of each step. |
First, the function selects those indicators (species or species combinations) with valid positive predictive value, sensitivity and indicator value, according to the input thresholds. If the object 'speciescomb
' contains confidence intervals, then the lower bounds are used to select the valid indicators. Second, the function discards those valid indicators whose occurrence pattern is nested within other valid indicators. Third, the function evaluates the coverage
of the remaining set of indicators and explores subsets of increasing number of indicators, until the same coverage is attained and the set of indicators is returned. If the maximum allowed members is attained (max.indicators
) then the set of indicators with maximum coverage is returned.
An object of class 'indicators
' with only the species combinations selected.
Miquel De Cáceres Ainsa, CTFC
De Cáceres, M., Legendre, P., Wiser, S.K. and Brotons, L. 2012. Using species combinations in indicator analyses. Methods in Ecology and Evolution 3(6): 973-982.
De Cáceres, M. and Legendre, P. 2009. Associations between species and groups of sites: indices and statistical inference. Ecology 90(12): 3566-3574.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(stats)
data(wetland) ## Loads species data
## Creates three clusters using kmeans
wetkm = kmeans(wetland, centers=3)
## Determine sensitivity of individual species
B=strassoc(wetland, cluster=wetkm$cluster,func="B")
## Select species with more than 20% of sensitivity for the first group
sel=which(B[,1]>0.2)
## Run indicator analysis with species combinations for the first group
sc= indicators(X=wetland[,sel], cluster=wetkm$cluster, group=1, verbose=TRUE, At=0.5, Bt=0.2)
## Finds the 'best' subset of indicators
sc2=pruneindicators(sc, At=0.5, Bt=0.2, verbose=TRUE)
print(sc2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.