[R] isoMDS
Doran, Harold
HDoran at air.org
Wed Sep 8 20:31:19 CEST 2004
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
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.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list