outlier: Outlier detection

Description Usage Arguments Value Author(s) References Examples

View source: R/outlier.R

Description

Identifies outliers based on the nearest neighbour criterion. It starts by computing a matrix of distances (correlation, r, used as distance, dr=(1-r)/2). Variables with nearest neighbour distance larger than parameter thresh are considered outliers.

Usage

1
2
3
4
5
6
7
8
9
outlier(veg, thresh, y,...)
outly(veg, thresh = 0.2, y = 0.5)

## Default S3 method:
outlier(veg, thresh, y,...)
## S3 method for class 'outlier'
plot(x,...)
## S3 method for class 'outlier'
print(x,...)

Arguments

veg

This is a vegetation data frame, releves are rows, species columns

thresh

Threshold nearest neighbour distance for outliers

y

Transformation of species scores: x'= x exp(y)

x

An object of class "outlier"

...

Parameter out.seq, the plotting interval

Value

An object of class "oulier" with at least the following items:

threshold

Threshold nearest neighbour distance for considering outliers

y

Transformation of species scores: x'= x exp(y)

rel.names

All row names

neigh.names

Names of the corresponding nearest neighbours

neigh.dist

Distance to the nearest neighbour

olddim

Dimensions of data frame veg

newdim

Dimensions of data frame with outliers erased

new.data

Vegetation data frame without outliers

pco.points

The pco ordination scores use for plotting

Author(s)

Otto Wildi

References

Wildi, O. 2017. Data Analysis in Vegetation Ecology. 3rd ed. CABI, Oxfordshire, Boston.

Examples

1
2
3
4
o.outlier<- outlier(nveg,thresh=0.2,y=0.5)
o.outlier                                    # a list of all variables
plot(o.outlier)                              # nearest neighbour histogram and
                                             # pco ordination 

dave documentation built on Nov. 17, 2017, 7:45 a.m.