2
我有5x14的數據矩陣。我正在使用MDS來獲取感知地圖。我可以正確地做MDS &得到結果。多維縮放
但我的問題是在MDS中我們可以映射行或列變量。是否可以使用MDS映射兩行&列變量。
我使用的代碼如下:
perp<-read.csv("E:\\Projects\\Combined_3.csv")
ads.dis<-dist(perp)
perp_mds <- cmdscale(ads.dis, k = 2,eig=TRUE)
x <- perp_mds$points[,1]
y <- perp_mds$points[,2]
plot(x,y, xlab = "Coordinate 1", ylab = "Coordinate 2", type = "n")
text(x,y, labels = rownames(perp))
,我會很感激,如果有人可以幫助我的編碼。
問候, 阿里
非常感謝加文!這正是我一直在尋找的東西。它就像一個魅力。 – Beta