View source: R/find.outliers.r

find.outliers | R Documentation |

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

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

`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 |

`reflection` |
logical: specify whether reflections are allowed for superimpositioning. |

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.

`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 |

Stefan Schlager

`typprob`

,`typprobClass`

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 }

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.