outlier: Outlier Detection

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

Description

Identifies outliers based on mean inter-plot dissimilarity or nearest neighbour criterion. Nearest neighbours can

Usage

1
2
## S4 method for signature 'Vegsoup'
outlier(obj, type = c("mccune", "wildi"), thresh = 0.2, ...)

Arguments

obj

A Vegsoup* object.

type

See ‘Details’.

thresh

Threshold nearest neighbour distance for outliers. If specified and argument type is missing it triggers type "wildi".

...

Not used.

Details

For type "mccune", the default, average Bray-Curtis dissimilarity of an outlier plot to other plots is greater than two standard deviations from the mean inter-plot dissimilarity (McCune & Grace 2002). For type "wildi" a threshold value has to be specified (Wildi 2013).

Value

Returns a logical vector equal to the number of plots where outlieres are TRUE. If type="wildi" nearest neighbour distances are given as attribute. See ‘Examples’.

Author(s)

Roland Kaiser using code from function outlier of package dave.

References

McCune, B. & Grace, J.B. 2002. Analysis of ecological communities. MjM Software design. Gleneden Beach OR, US.

Wildi, O. 2013. Data Analysis in Vegetation Ecology. 2nd ed. Wiley-Blackwell, Chichester.

See Also

plotPCO, coldiss, outlier in dave.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
require(vegsoup)

data(barmstein)
x <- barmstein

( o1 <- outlier(x) )
( o2 <- outlier(x, type = "wildi") )

# access nearest neighbour distances 
attr(o2, "distances")

# argument thresh triggers type "wildi"
o3 <- outlier(x, thresh = 0.3)

# drop outliers
dim(x)
dim(x[!o3, ])

# outliers marked in diagnostic plots
plotPCO(x)
plotPCO(x, thresh = 0.2)

vegsoup documentation built on Feb. 24, 2021, 3 a.m.