質問

I have a question concerning the smacofSym function in the Smacof package. I am using R version 3.1.0 through RStudio Version 0.98.501.

I am using the following command:

MDSdata <- smacofSym(DJaccardMatrix, ndim=2, metric=FALSE, verbose=TRUE).

I've included details of the data I'm using (DJaccardMatrix) below. Every time I run smacofSym I end up with a configuration where the final configuration is right on top of each other. Here is a sample of the results:

MDSdata$conf
         D1          D2
1    0.06259624 -0.01494732
2    0.06276541 -0.01480409
3    0.06266933 -0.01492375
4    0.06262438 -0.01496111
5    0.06243336 -0.01496193
6    0.06258047 -0.01502270
7    0.06247747 -0.01500037 .......

To check the results I ran the same matrix on XLStat and got what I was expecting, a much more distributed set of points. After looking at some of the other help requests I've tried running smacofSym as both a matrix and dist, but neither has affected the results.

Here is my info on DJaccardMatrix as a matrix:

num [1:121, 1:121] 0 0.969 0.679 0.704 0.939 ...
attr(*, "dimnames")=List of 2 
..$ : chr [1:121] "1" "2" "3" "4" ...
..$ : chr [1:121] "1" "2" "3" "4" ...

Here is my info on DJaccardMatrix as a dist object:

Class 'dist'  atomic [1:7260] 0.969 0.679 0.704 0.939 0.8 ...
  ..- attr(*, "Size")= int 121
  ..- attr(*, "call")= language as.dist.default(m = dissmat)
  ..- attr(*, "Diag")= logi FALSE
  ..- attr(*, "Upper")= logi FALSE

I'm thankful for any recommendations people have. I am assuming it is something very basic, but I am definitely not finding it. (On a side note - feel free to ignore this because it's concerning interpretation - what is the relation between the nonmetric stress that smacof reports and Kruskal's stress? Is there any?)

役に立ちましたか?

解決

This answer concerns your side question in parenthesis at the end: "what is the relation between the nonmetric stress that smacof reports and Kruskal's stress"

Kruskal's stress (or Stress-1) is the square root of the nonmetric stress (stress.nm) reported by smacof.

So, if you have a model called mod obtained by running smacofSym:

Stress-1 = mod$stress.nm^.5

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top