Learn R Programming

indicspecies (version 1.7.6)

pruneindicators: Determines the best subset of indicators

Description

This function allows reducing drastically the number of species combinations to be retained for a given target site group.

Usage

pruneindicators(x, At=0, Bt=0, sqrtIVt=0, max.indicators=4, verbose=FALSE)

Arguments

x

An object of class 'indicators'.

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 NULL, the function returns all the non-nested valid indicators without further selection.

verbose

If TRUE, prints the results of each step.

Value

An object of class 'indicators' with only the species combinations selected.

Details

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.

References

De C<U+00E1>ceres, M., Legendre, P., Wiser, S.K. & Brotons, L (in preparation). Using species combinations in indicator analyses.

De C<U+00E1>ceres, M. and Legendre, P. 2009. Associations between species and groups of sites: indices and statistical inference. Ecology 90(12): 3566-3574.

See Also

indicators, coverage

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab