Prof Brian Ripley
2000-Feb-29 18:11 UTC
Reading the documentation (was [R] isoMDS error message!!!)
> Date: Tue, 29 Feb 2000 17:03:51 +0100 (MET) > From: Andrea Rossetti <rossetti at markov.stat.unipg.it>[Mail to your address is undeliverable!!!]> I do this > > > valumod<-read.table("valu-medie.txt",header=T) > > library(mass) > > library(mva) > > valumod.x <- as.matrix(valumod) > > valumod.dist<-dist(valumod.x) > > valumod.mds <- isoMDS(valumod.dist) > Error in isoMDS(valumod.dist) : zero or negative distance between objects 2and 4 It means that rows 2 and 4 of valumod.x are identical.> Where is the error?isoMDS is from package MASS, and there is an example of this, the reason for it and the workaround on page 334 of the book MASS!!! When people produce code to support a book, the book is part of the documentation. However, the help page is quite explicit: d: distance structure of the form returned by `dist', or a full, symmetric matrix. Data are assumed to be dissimilarities or relative distances, but must be positive except for self-distance. It does help to read the documentation!!!> PS I've attached the dataset.No sign of it. -- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._