[R] Stress with MDS
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Feb 20 18:03:10 CET 2008
I presume this is isoMDS which is part of package MASS, support software
for a book. The definitions of 'stress' are in that book, and the source
code is part of the package.
It makes no sense to use a metric definition of stress with a non-metric
method of fitting: the original and fitted distances are not even on the
same scale.
As for 'nmds', you haven't told us where you found it: please remember to
supply the 'at a minimum' infomation the posting guide asked for. (There
are at least two packages supplying a function of that name.) It is
standard academic practice (and basic courtesy) to acknowledge the
authorship of software you use -- that includes isoMDS.
You need to do some background reading to answer your questions: the
references in the help for isoMDS would be a good start.
On Wed, 20 Feb 2008, Montignies Francois wrote:
> Hi,
>
> I am looking for the best multidimensional configuration for my data (47*47
> distance matrix).
> I ve tried classical metric (cmdscale) and non metric MDS (isoMDS, nmds)
> but it is now difficult to choose the best solution because of the
> uncertainties in the definitions of the "stress" function.
>
> So, same problem, several questions :
>
> 1. Statistical consideration : With "cmdscale" we get eigen values. What is
> the best way to choose optimal dimensionality? With the eigen values and
> corresponding GOF like we do with PCA ? If I compute stress1, does it make
> any sense (I saw it in some publications)?
>
> 2. With isoMDS and nmds we get the final stress but i can't find the source
> code so i don't know what is in the box. Obviously, I got different values
> from isoMDS and nmds . I started from the same initial configuration
> (cmdscale) and the same parameters (maxit,tol)to compare results.
> I tried to compute stress1 by myself and find values closed to nmds with
> ndms config, but far away from isoMDS with isoMDS config (plus a strange
> increasing value between k=4 and k=5). Could you help me please? I lost
> myself...
>
> k isoMDS$stress stress1(isoMDS) nmds$stress stress1(nmds)
> 2 0,18830413 0.2912164 0.2758062 0.2658789
> 3 0,11521339 0.1866746 0.1754007 0.1727632
> 4 0,08733106 0.1638274 0.1281730 0.1271329
> 5 0,06942862 0.1991569 0.09756043 0.0970992
> 6 0,05751437 0.1563326 0.07846889 0.07822841
>
> Here is my stress1 function
>
> stress1<-function(datadist,fitteddist)
> {sqrt(sum((datadist-fitteddist)^2)/sum(datadist^2))}
>
> Best regards
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
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