1

I plan to use multiple scaling in R and start with a toy example. There are two matrices. The first contains 10 observations and the second one contains two replicated rows. It appears that the repeated rows are projected to different positions. Intuitively I expect the replicates are projected to (approximately) the same position in lower dimensional plot but seems not. Below is the code:

 aa <- matrix(sample(1:10,1000,replace=T),nrow=10)
 bb <- rbind(aa,aa[c(3,5),])
 dist1 <- dist(aa)
 dist2 <- dist(bb)
 fit1 <- cmdscale(dist1,eig=TRUE, k=2)
 fit2 <- cmdscale(dist2,eig=TRUE, k=2)
 par(mfrow=c(2,1))
 x1 <- fit1$points[,1]
     y1 <- fit1$points[,2]
 plot(x1,y1)

 x2 <- fit2$points[,1]
     y2 <- fit2$points[,2]
 plot(x2,y2)

So I am not sure if anything wrong or that is the nature of this method. In this case, what would be the explanation or solution (project to a higher dimension, choose other methods)?

  • Why? In your second (bb) data, points 11 and 12, the replicates of points 3 and 5, respectively, get exactly the same coordinates as those. Consequently, 10 (not 12) separate points are seen on the second plot. – ttnphns Aug 14 '13 at 22:21
  • Thank you for pointing it out. Another question is that the plots look quite different. Does it indicate anything? – user28363 Aug 15 '13 at 13:59

0 Answers0