[R] mahalanobis distance
ekinakoglu
ekin at ims.metu.edu.tr
Mon Jul 20 15:08:45 CEST 2009
http://www.nabble.com/file/p24569511/mahalanobis.txt mahalanobis.txt
http://www.nabble.com/file/p24569511/concentrations.txt concentrations.txt
Dear Forum members,
I have a problem calculating mahalanobis distances. My data file
mahalanobis.txt and categories file concentrations.txt are attached. I do
the following steps:
x <- as.matrix(read.table("mahalanobis.txt", header=TRUE))
y <- as.matrix(read.table("concentrations.txt", header=TRUE))
S <- var(x)
mahalanobis(x,y,S)
and it gives this error:
Error in solve.default(cov, ...) :
system is computationally singular: reciprocal condition number =
1.65972e-18
What is wrong? Could you please help me??
Thank you...
--
View this message in context: http://www.nabble.com/mahalanobis-distance-tp24569511p24569511.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list