Skip to contents

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,
  alpha = 1,
  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.

alpha

Threshold for statistical significance of indicator value. Combinations with higher p-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á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

Author

Miquel De Cáceres Ainsa, EMF-CREAF

Examples

library(stats)

data(wetland) ## Loads species data

## Creates three clusters using kmeans
wetkm <- kmeans(wetland, centers=3) 

## Run indicator analysis with species combinations for the first group
sc <- indicators(X=wetland, cluster=wetkm$cluster, group=1, verbose=TRUE, At=0.5, Bt=0.2)
#> Target site group: 1
#> Number of candidate species: 33
#> Number of sites: 41 
#> Size of the site group: 14 
#> Starting species  1 ... accepted combinations: 0 
#> Starting species  2 ... accepted combinations: 0 
#> Starting species  3 ... accepted combinations: 16 
#> Starting species  4 ... accepted combinations: 32 
#> Starting species  5 ... accepted combinations: 32 
#> Starting species  6 ... accepted combinations: 79 
#> Starting species  7 ... accepted combinations: 79 
#> Starting species  8 ... accepted combinations: 82 
#> Starting species  9 ... accepted combinations: 88 
#> Starting species  10 ... accepted combinations: 88 
#> Starting species  11 ... accepted combinations: 88 
#> Starting species  12 ... accepted combinations: 92 
#> Starting species  13 ... accepted combinations: 92 
#> Starting species  14 ... accepted combinations: 92 
#> Starting species  15 ... accepted combinations: 112 
#> Starting species  16 ... accepted combinations: 115 
#> Starting species  17 ... accepted combinations: 115 
#> Starting species  18 ... accepted combinations: 115 
#> Starting species  19 ... accepted combinations: 115 
#> Starting species  20 ... accepted combinations: 120 
#> Starting species  21 ... accepted combinations: 136 
#> Starting species  22 ... accepted combinations: 139 
#> Starting species  23 ... accepted combinations: 143 
#> Starting species  24 ... accepted combinations: 144 
#> Starting species  25 ... accepted combinations: 144 
#> Starting species  26 ... accepted combinations: 144 
#> Starting species  27 ... accepted combinations: 144 
#> Starting species  28 ... accepted combinations: 144 
#> Starting species  29 ... accepted combinations: 144 
#> Starting species  30 ... accepted combinations: 144 
#> Starting species  31 ... accepted combinations: 144 
#> Starting species  32 ... accepted combinations: 144 
#> Starting species  33 ... accepted combinations: 144 
#> Number of valid combinations: 144
#> Number of remaining species: 15 
#> Calculating statistical significance (permutational test)...

## Finds the 'best' subset of indicators
sc2 <- pruneindicators(sc, At=0.5, Bt=0.2, verbose=TRUE)
#> Coverage of initial set of 144 indicators: 100%
#> Coverage of valid set of 144 indicators: 100%
#> Coverage of valid set of 10 nonnested indicators: 100%
#> Checking 10 subsets of 1 indicator(s) maximum coverage: 100%
#> Coverage of final set of 1 indicators: 100%
print(sc2)
#>                A B    sqrtIV p.value
#> Phynod 0.9473684 1 0.9733285   0.005