Vincent Deng
2005-Dec-28 09:34 UTC
[R] Which cluster function can be used to cluster a correlaiton matrix?
Hi, I'd got a matrix of correaltion values. Which cluster method can I use to cluster it? Best Regards...
Martin Maechler
2005-Dec-28 10:59 UTC
[R] Which cluster function can be used to cluster a correlaiton matrix?
>>>>> "Vincent" == Vincent Deng <bioflash at gmail.com> >>>>> on Wed, 28 Dec 2005 17:34:27 +0800 writes:Vincent> Hi, I'd got a matrix of correaltion values. Which Vincent> cluster method can I use to cluster it? almost everyone. The clue is to transform correlations to dissimilarities. There are several choices for that, and it depends on the context what you should do. If 'Cx' is your correlation matrix, reasonable possibilities are Dx <- as.dist(1 - Cx) Dx <- as.dist(1 - abs(Cx)) Dx <- as.dist(sqrt(1 - Cx^2)) and then use hclust(), agnes(), pam(), [the latter two from package 'cluster'], ... with 'Dx' as dissimilarity