Distances cannot always be constructed from similarities. This can be done only if the matrix of similarities is nonnegative definite. With the nonnegative definite condition, and with the maximum similarity scaled so that s_ii=1, d_ik=(2*(1-s_ik))^-.5
Check out the vegan package. Alex -----Original Message----- From: Doran, Harold [mailto:[EMAIL PROTECTED] Sent: September 8, 2004 10:00 AM To: [EMAIL PROTECTED] Cc: Doran, Harold Subject: [R] isoMDS Dear List: I have a question regarding an MDS procedure that I am accustomed to using. I have searched around the archives a bit and the help doc and still need a little assistance. The package isoMDS is what I need to perform the non-metric scaling, but I am working with similarity matrices, not dissimilarities. The question may end up being resolved simply. Here is a bit of substantive background. I am working on a technique where individuals organize items based on how similar they perceive the items to be. For example, assume there are 10 items. Person 1 might group items 1,2,3,4,5 in group 1 and the others in group 2. I then turn this grouping into a binomial similarity matrix. The following is a sample matrix for Person 1 based on this hypothetical grouping. The off diagonals are the similar items with the 1's representing similarities. a b c d e f g h i j a 1 1 1 1 1 0 0 0 0 0 b 1 1 1 1 1 0 0 0 0 0 c 1 1 1 1 1 0 0 0 0 0 d 1 1 1 1 1 0 0 0 0 0 e 1 1 1 1 1 0 0 0 0 0 f 0 0 0 0 0 1 1 1 1 1 g 0 0 0 0 0 1 1 1 1 1 h 0 0 0 0 0 1 1 1 1 1 i 0 0 0 0 0 1 1 1 1 1 j 0 0 0 0 0 1 1 1 1 1 Each of these individual matrices are summed over individuals. So, in this summed matrix diagonal elements represent the total number of participants and the off-diagonals represent the number of times an item was viewed as being similar by members of the group (obviously the matrix is symmetric below the diagonal). So, a "4" in row 'a' column 'c' means that these items were viewed as being similar by 4 people. A sample total matrix is at the bottom of this email describing the perceived similarities of 10 items across 4 individuals. It is this total matrix that I end up working with in the MDS. I have previously worked in systat where I run the MDS and specify the matrix as a similarity matrix. I then take the resulting data from the MDS and perform a k-means cluster analysis to identify which items belong to a particular cluster, centroids, etc. So, here are my questions. 1) Can isoMDS work only with dissimilarities? Or, is there a way that it can perform the analysis on the similarity matrix as I have described it? 2) If I cannot perform the analysis on the similarity matrix, how can I turn this matrix into a dissimilarity matrix necessary? I am less familiar with this matrix and how it would be constructed? Thanks for any help offered, Harold a b c d e f g h i j a 4 2 4 3 3 2 0 0 0 0 b 2 4 2 3 1 0 2 2 2 2 c 4 2 4 3 3 2 0 0 0 0 d 3 3 3 4 2 1 1 1 1 1 e 3 1 3 2 4 3 1 1 1 1 f 2 0 2 1 3 4 2 2 2 2 g 0 2 0 1 1 2 4 4 4 4 h 0 2 0 1 1 2 4 4 4 4 i 0 2 0 1 1 2 4 4 4 4 j 0 2 0 1 1 2 4 4 4 4 [[alternative HTML version deleted]] ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html