find.outliers: Graphical interface to find outliers and/or to switch...

View source: R/find.outliers.r

find.outliersR Documentation

Graphical interface to find outliers and/or to switch mislabeld landmarks

Description

Graphical interface to find outliers and/or to switch mislabeld landmarks

Usage

find.outliers(
  A,
  color = 4,
  lwd = 1,
  lcol = 2,
  mahalanobis = FALSE,
  PCuse = NULL,
  text = TRUE,
  reflection = FALSE
)

Arguments

A

Input k x m x n real array, where k is the number of points, m is the number of dimensions, and n is the sample size.

color

color of Landmarks points to be plotted

lwd

linewidth visualizing distances of the individual landmarks from mean.

lcol

color of lines visualizing distances of the individual landmarks from mean.

mahalanobis

logical: use mahalanobis distance to find outliers.

PCuse

integer: Restrict mahalanobis distance to the first n Principal components.

text

logical: if TRUE, landmark labels (rownumbers) are displayed

reflection

logical: specify whether reflections are allowed for superimpositioning.

Details

This function performs a procrustes fit and sorts all specimen according to their distances (either Procrustes or Mahalanobis-distance) to the sample's consensus. It provides visual help for rearranging landmarks and/or excluding outliers.

Value

data.cleaned

array (in original coordinate system) containing the changes applied and outliers eliminated

outlier

vector with integers indicating the positions in the original array that have been marked as outliers

dist.sort

table showing the distance to mean for each observation - decreasing by distance

type

what kind of distance was used

Author(s)

Stefan Schlager

See Also

typprob,typprobClass

Examples


data(boneData)
## look for outliers using the mahalanobis distance based on the first
# 10 PCscores
# to perform the example below, you need,of course, uncomment the answers
if (interactive()){
outliers <- find.outliers(boneLM, mahalanobis= TRUE, PCuse=10)
# n # everything is fine 
# n # proceed to next
# s # let's switch some landmarks (3 and 4)
# 3
# 4
# n # we are done
# y # yes, because now it is an outlier
# s #enough for now
}


Morpho documentation built on Feb. 16, 2023, 10:51 p.m.