Learn R Programming

fpc (version 2.2-13)

localshape: Local shape matrix

Description

This computes a matrix formalising 'local shape', i.e., aggregated standardised variance/covariance in a Mahalanobis neighbourhood of the data points. This can be used for finding clusters when used as one of the covariance matrices in Invariant Coordinate Selection (function ics in package ICS), see Hennig's discussion and rejoinder of Tyler et al. (2009).

Usage

localshape(xdata,proportion=0.1,mscatter="mcd",mcdalpha=0.8,
                       covstandard="det")

Value

The local shape matrix.

Arguments

xdata

objects times variables data matrix.

proportion

proportion of points to be considered as neighbourhood.

mscatter

"mcd" or "cov"; specified minimum covariance determinant or classical covariance matrix to be used for Mahalanobis distance computation.

mcdalpha

if mscatter="mcd", this is the alpha parameter to be used by the MCD covariance matrix, i.e. one minus the asymptotic breakdown point, see covMcd.

covstandard

one of "trace", "det" or "none", determining by what constant the pointwise neighbourhood covariance matrices are standardised. "det" makes the affine equivariant, as noted in the discussion rejoinder of Tyler et al. (2009).

References

Tyler, D. E., Critchley, F., Duembgen, L., Oja, H. (2009) Invariant coordinate selection (with discussion). Journal of the Royal Statistical Society, Series B, 549-592.

Examples

Run this code
  options(digits=3)
  data(iris)
  localshape(iris[,-5],mscatter="cov")

Run the code above in your browser using DataLab