pruneindicators: Determines the best subset of indicators

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pruneindicators.r

Description

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

Usage

1
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.

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.

Value

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

Author(s)

Miquel De Cáceres Ainsa, CTFC

References

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.

See Also

indicators, coverage

Examples

 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)

miquelcaceres/indicspecies documentation built on May 22, 2019, 3:49 p.m.