Learn R Programming

Morpho (version 2.1)

find.outliers: 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)

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

Value

  • data.cleanedarray (in original coordinate system) containing the changes applied and outliers eliminated
  • outliervector with integers indicating the positions in the original array that have been marked as outliers
  • dist.sorttable showing the distance to mean for each observation - decreasing by distance
  • typewhat kind of distance was used

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.

See Also

typprob,typprobClass

Examples

Run this code
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
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

Run the code above in your browser using DataLab