[R] isoMDS
Kjetil Brinchmann Halvorsen
kjetil at acelerate.com
Thu Sep 9 03:53:23 CEST 2004
Doran, Harold wrote:
>Thank you. Quick clarification. isoMDS only works with dissimilarities.
>Converting my similarity matrix into the dissimilarity matrix is done as
>(from an email I found on the archives)
>
>
>
>>d<- max(tt)-tt
>>
>>
>
>
>
Mardia, kent & Bibby defines the "standard transformation" from a
similarity matrix to a dissimilarity
(distance) matrix by
d_rs <- sqrt( c_rr -2*c_rs + c_ss)
where c_rs are the similarities. This assures the diagonal of the
dissimilarity matrix to be zero.
You could try that.
Kjetil halvorsen
>Where tt is the similarity matrix. With this, I tried isoMDS as follows:
>
>
>
>>tt.mds<-isoMDS(d)
>>
>>
>
>and I get the following error message.
>
>Error in isoMDS(d) : An initial configuration must be supplied with
>NA/Infs in d. I was a little confused on exactly how to specify this
>initial config. So, from here I ran cmdscale on d as
>
>
>
>>d.mds<-cmdscale(d)
>>
>>
>
>which seemed to work fine and produce reasonable results. I was able to
>take the coordinates and run them through a k-means cluster and the
>results seemed to correctly match the grouping structure I created for
>this sample analysis.
>
>Cmdscale is for metric scaling, but it seemed to produce the results
>correctly.
>
>So, did I correctly convert the similarity matrix to the dissimilarity
>matrix? Second, should I have used cmdscale rather than isoMDS as I have
>done? Or, is there a way to specify the initial configuration that I
>have not done correctly.
>
>Again, many thanks.
>
>Harold
>
>-----Original Message-----
>From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
>Sent: Wednesday, September 08, 2004 9:58 AM
>To: Doran, Harold
>Cc: r-help at stat.math.ethz.ch
>Subject: Re: [R] isoMDS
>
>On Wed, 8 Sep 2004, Doran, Harold wrote:
>
>
>
>>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?
>>
>>
>
>Yes. The method, as well as the function in package MASS. All other
>MDS packages are doing a conversion, probably without telling you how.
>
>
>
>>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?
>>
>>
>
>Normally similarities are in the range [0,1], and people use D = 1 - S
>or
>sqrt(1-S). (Which does not matter for isoMDS since it only uses ranks of
>dissimilarities, apart from finding the starting configuration.) See
>the
>references on the help page for isoMDS.
>
>
>
--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
-- Mahdi Elmandjra
More information about the R-help
mailing list