Yianni
You probably would have gotten more helpful replies if you indicated
the substantiative problem you were trying to solve.
From your description, it seems like you want to calculate
leverage of predictors, (X1, X2) in the lm( y ~ X1+X2).
My crystal ball says you may be an SPSS user, for
On 31/05/07, Anup Nandialath [EMAIL PROTECTED] wrote:
oops forgot the example example
try this line
sqrt(mahalanobis(all, colMeans(predictors), cov(all), FALSE)
Hi and thanks for the reply Anup. Unfortunately, I had a look on the
example before posting but not much of a help... I did some
Hi, I am not sure I am using correctly the mahalanobis distnace method...
Suppose I have a response variable Y and predictor variables X1 and X2
all - cbind(Y, X1, X2)
mahalanobis(all, colMeans(all), cov(all));
However, my results from this are different from the ones I am getting
using another
I want to calculate the probability that a group will include a particular
point using the squared Mahalanobis distance to the centroid. I understand
that the squared Mahalanobis distance is distributed as chi-squared but that
for a small number of random samples from a multivariate normal
I want to calculate the probability that a group will include a particular
point using the squared Mahalanobis distance to the centroid. I understand
that the squared Mahalanobis distance is distributed as chi-squared but that
for a small number of random samples from a multivariate normal
Dear R community
Have just recently got back into R after a long break and have been amazed at
how much it has grown, and how active the list is! Thank you so much to all
those who contribute to this amazing project.
My question:
I am trying to calculate Mahalanobis distances for a matrix
The first thing I'd try is scale, as that should not affect the
Mahalinobis distances:
Fgmat - scale(fgmatrix)
fg.cov - cov.wt(Fgmat)
mahalanobis(Fgmat, center = Fg.cov$center, cov = Fg.cov$cov)
Does this give you the same result. If no, the
On Fri, 24 Jun 2005, Spencer Graves wrote:
(...)
The key is computing your own generalized inverse and using that with
inverted=TRUE.
(...)
One method to do this is function solvecov in package fpc.
Christian
spencer graves
Karen Kotschy wrote:
Dear R community
Have
Is there a function that calculate the mahalanobis distance in R .
The dist function calculates euclidean', 'maximum', 'manhattan',
'canberra',
'binary' or 'minkowski'.
Thanks ../Murli
__
[EMAIL PROTECTED] mailing list
See (surprising enough) ?mahalanobis...
Andy
From: Murli Nair
Is there a function that calculate the mahalanobis distance in R .
The dist function calculates euclidean', 'maximum',
'manhattan',
'canberra',
'binary' or 'minkowski'.
Thanks ../Murli
: [R] mahalanobis distance
Is there a function that calculate the mahalanobis distance in R .
The dist function calculates euclidean', 'maximum',
'manhattan', 'canberra', 'binary' or 'minkowski'.
Thanks ../Murli
__
[EMAIL PROTECTED] mailing list
Dear all
Why isn'it possible to calculate Mahalanobis distances with R for a matrix
with 1 row (observations) more than the number of columns (variables)?
mydata - matrix(runif(12,-5,5), 4, 3)
mahalanobis(x=mydata, center=apply(mydata,2,mean), cov=var(mydata))
[1] 2.25 2.25 2.25 2.25
mydata
If I'm not mistaken, the data you generated form a simplex in the
p-dimensional space. Mahalanobis distance for such data, using sample mean
and covariance, just give the distance to the centroid after normalization.
The normalization step make all the points equidistance from the centroid.
To
13 matches
Mail list logo