Hi Weiwei, I found your post on Mahalanobis distances five years ago.>/ >>>Error in solve.default(cov, ...) : system is computationally singular:/>/ >>>reciprocal condition number = 1.09501e-25 /I have the same problem now - and I don't know how to deal with it. I would be thankful if you could help me with that. All the best, Matthias // [[alternative HTML version deleted]]