There is still no call to isoMDS in your code, and nothing we can reproduce.

It all depends on the dissimilarity matrix you have not given us: maybe there is no good 2D representation of it.

Looks like you need to ask a local expert about what you are doing, for this is a statistical and not an R question.


On Wed, 3 Sep 2008, 陈武 wrote:

Sorry, wrong code. The right one here:

library(MASS)
cl<-read.table("e:/data.txt",header=T,sep=",")
row.names(cl)<-colnames(cl)
cm<-as.matrix(cl)
loc<-sammon(cm)
jpeg(filename="e:/plot.gif",width = 480, height = 480, units = "px",
pointsize = 12, quality = 75, bg = "white", res = NA, restoreConsole = TRUE)
plot(loc$points,type="p")
text(loc$points,rownames(cl),cex=1,pos=1,offset=1)
dev.off()

And "e:/data.txt" contains a 40*40 dissimilarity matrix. Thanks for you
advices!


2008/9/3, ???? <[EMAIL PROTECTED]>:

I apply isoMDS to my data, but the result turns out to be bad as the stress
value stays around 31! Yeah, 31 ,not 3.1... I don't know if I ignore
something before recall isoMDS.
My code as follow:

m <- read.table("e:/tsdata.txt",header=T,sep=",")
article_number <- ts(m, start = 2004,end=2008, frequency = 1
,names=colnames(m))
jpeg(filename="e:/tsmap.gif",width = 480, height = 480, units = "px",
pointsize = 12, quality = 75, bg = "white", res = NA, restoreConsole = TRUE)
plot(article_number, plot.type="single",
lty=c(1,1,1,1,1),col=c(1,2,3,4,5),las=1)
max<-range(m)
x<-c(2004,2004,2004,2004,2004)

y<-c(max[2]*0.96,max[2]*0.9199999999999999,max[2]*0.88,max[2]*0.84,max[2]*0.7999999999999999)
points(x,y,col=c(1,2,3,4,5),pch=15)
text(x,y,colnames(m),pos=4,offset=0.4)
dev.off()

A 40*40 matrix in "e:/tsdata.txt". How should I do to improve the effect?
Thank you!


        [[alternative HTML version deleted]]

--
Brian D. Ripley,                  [EMAIL PROTECTED]
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
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to