Description Usage Arguments Details Value Note Author(s) See Also Examples
MahalanobisDist computes the Mahalanobis distances to the center or to other observations.
1 2 3 4 5 6 7 8 9  MahalanobisDist(x,center=NULL,cov=NULL,inverted=FALSE,...)
## S3 method for class 'rmult'
MahalanobisDist(x,center=NULL,cov=NULL,inverted=FALSE,...,
goodOnly=NULL,pairwise=FALSE,pow=1,
robust=FALSE,giveGeometry=FALSE)
## S3 method for class 'acomp'
MahalanobisDist(x,center=NULL,cov=NULL,inverted=FALSE,...,
goodOnly=NULL, pairwise=FALSE,pow=1,robust=FALSE,giveGeometry=FALSE)

x 
the dataset 
robust 
logical or a robust method description (see

... 
Further arguments to 
center 
An estimated for the center (mean) of the dataset. If center is NULL it will be estimated based using the given robust option. 
cov 
An estimated for the spread (covariance matrix) of the dataset. If cov is NULL it will be estimated based using the given robust option. 
inverted 
TRUE if the inverse of the covariance matrix is given. 
goodOnly 
An vector of indices to the columns of x that should be used for estimation of center and spread. 
pairwise 
If FALSE the distances to the center are returned as a vector. If TRUE the distances between the cases are returned as a distance matrix. 
pow 
The power of the Mahalanobis distance to be used. 1
correponds to the square root of the squared distance in
transformed space, like it is defined in most books. The choice 2
corresponds to what is implemented in many software package
including the 
giveGeometry 
If true an atrributes 
The Mahalanobis distance is the distance in a linearly transformed space, where the linear transformation is selected in such a way,that the variance is the unit matrix. Thus the distances are given in multiples of standard deviation.
Either a vector of Mahalanobis distances to the center, or a distance
matrix (like from dist
) giving the pairwise Mahalanobis
distances of the data.
Unlike the mahalanobis
function this function does not
be default compute the square of the mahalanobis distance. The pow
option is provided if the square is needed.
The package robustbase is required for using the
robust estimations.
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
1 2 3 4 5 6 7  data(SimulatedAmounts)
data5 < acomp(sa.outliers5)
cl < ClusterFinder1(data5,sigma=0.4,radius=1)
plot(data5,col=as.numeric(cl$types),pch=as.numeric(cl$types))
legend(1,1,legend=levels(cl$types),xjust=1,col=1:length(levels(cl$types)),
pch=1:length(levels(cl$types)))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.