search for: cmdscale

Displaying 20 results from an estimated 120 matches for "cmdscale".

2002 Feb 15
1
cmdscale k=1
In applying multidimensional scaling, it seems to me that sometimes the underlying dimensionality of the matrix is 1. However I found a case where cmdscale failed when I tried k=1. Here it is: m<-matrix( c(.5,.81,.23,.47,.61, .19,.5,.06,.17,.28, .77,.94,.5,.74,.85, .53,.83,.26,.5,.64, .39,.72,.15,.36,.5), nrow=5) # BTW I think cmdscale uses only the lower triangle--how to enter only # that bit and save some data entry? fit<-cmdscale(dist(m),k...
2014 Nov 06
1
limit of cmdscale function
Hi We have a few questions regarding the use of the "isoMDS" function. When we run "isoMDS" function using 60,000 x 60,000 data matrix, we get the following error message: ------------------------------------ cmdscale(d, k) : invalid value of 'n' Calls: isoMDS -> cmdscale ------------------------------------ We checked the source code of "cmdscale" and found the following limitation: ------------------------------------ ## we need to handle nxn internally in dblcen if(is.na(n) || n > 463...
2007 Jun 14
2
Difference between prcomp and cmdscale
I'm looking for someone to explain the difference between these procedures. The function prcomp() does principal components anaylsis, and the function cmdscale() does classical multi-dimensional scaling (also called principal coordinates analysis). My confusion stems from the fact that they give very similar results: my.d <- matrix(rnorm(50), ncol=5) rownames(my.d) <- paste("c", 1:10, sep="") # prcomp prc <- prcomp(my.d) # c...
2005 Jan 08
0
cmdscale problem
Dear R developers, there appears to be a small problem with function cmdscale: for non-Euclidean distance matrices, using option add=FALSE (the default), cmdscale misses the smallest eigenvalue. This affects GOF statistic g.1 (See Mardia, Kent + Bibby (1979): Multivariate Analysis, eq. (14.4.7). The corresponding formula in Cox + Cox (2001): Multidimensional Scaling, 2n...
2003 Oct 07
0
NaN values returned by cmdscale
Hello all, I'm using R1.7.1 on Linux, generating sammon-optimized MDS plots from distance matrices. This is a calculation I run routinely, often on sample sets of up to 100 samples. This time, with three samples, the sammon function returned an error (shown below), which I tracked down to the cmdscale function it uses to find a starting configuration. In short, cmdscale is returning NaN values for the second-dimension coordinates. I was able to sidestep this problem by adding the following line to the sammon code, in order to give a default configuration under this circumstance. y[!is.fini...
2013 Apr 26
1
prcomp( and cmdscale( not equivalent?
...created from taking the inverse of normalized reaction times. That is, each cell of the matrix represents how long it took to distinguish two stimuli from one another-- a square matrix of 45X45 where the diagonal values are all zero (since this represents two identical stimuli). I have been using cmdscale with this matrix as the input-- So: X = cmdscale(mydata,k=44,add=FALSE,eig=TRUE)$points returns a 45x34 matrix because only 34 of the eigenvalues > 0 I then run prcomp on the (transposition of) this matrix: prcomp(t(X),scale.=TRUE) The goal is to take the original matrix of inverse reaction...
2007 Jul 23
2
cmdscale question
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matricies such as: A B C D E A 0 1 23 12 9 B 1 0 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 3 4 21 0 i.e. matrices which do not represent physical distances between places (as they would not make sense for real distances such as...
2001 Dec 18
0
cmdscale: labels missing (PR#1220)
The function cmdscale tries to copy names from the source to the result. This only works if the source is a matrix. If m is a matrix with labels (rownames) and d is an object of class "dist" with labels, this works: cmdscale(m) ...but with this, there are no labels in the results: cmdscale(d) Howe...
2013 Apr 09
0
How does clusplot exactly make use of cmdscale?
Dear people, I used clusplot to plot a partition result. The partition result was from pamk with a distance object as input. Then I applied cmdscale on the same distance object for coordinates to make another scatterplot. My problem is this: the coordinates from the cmdscale calculation, though with the same shape, were different in scale and rotation from the scatter plot yielded by clusplot. clusplot is scaled around [-20, 30], while cmdscal...
2004 Sep 08
8
isoMDS
Dear List: I have a question regarding an MDS procedure that I am accustomed to using. I have searched around the archives a bit and the help doc and still need a little assistance. The package isoMDS is what I need to perform the non-metric scaling, but I am working with similarity matrices, not dissimilarities. The question may end up being resolved simply. Here is a bit of substantive
2001 Jul 17
2
cmdscale in package mva (PR#1027)
Full_Name: Laurent Gautier Version: 1.3.0-patched OS: IRIX 6.5 Submission from: (NULL) (130.225.67.199) Hello, The function La.eigen, called by cmdscale in the package mva behaves an unexplicable way (for me). The following lines show what happened. I tried the very same on linux, and it worked fine. >a <- matrix(c(1,2,3,2),3,3) >a [,1] [,2] [,3] [1,] 1 2 3 [2,] 2 1 2 [3,] 3 2 1 >library(mva) >cmd...
2008 Dec 10
1
convert dataframe to matrix for cmdscale
...he subject, who judges how different they are. The stimuli are presented twice, once in the order a,b and once in the order b,a. Subjects are not perfectly consistent and so will not give exactly the same answer twice. However it is reasonable to take the average of a,b and b,a. I would like to do cmdscale or isoMDS on the data. As I understand it, these take the data as a lower triangle. At least that is how the eurodist example for cmdscale went. So in my case I need c b 1.20 a 0.95 2.10 a b c Starting from the dataframe at the top of this posting, how do I get a lower trian...
2002 Nov 23
0
Intermittant hang in cmdscale (PR#2323)
Full_Name: Cam Webb Version: 1.6.0 (fink X11 compile) OS: Mac OS X (Jaguar) Submission from: (NULL) (64.168.28.87) This is an unpredictable, intermittant hang during cmdscale of the mva library. Some data never cause a problem, other data always do, abut I can't track down the difference in the structure of the data. Sometimes the function will work for `difficult' data after it has been run in the same session for `behaved' data (eurodist always works)!...
2005 Nov 04
1
Stress in multidimensional scaling
Hello, We are trying to find a function to compute "stress" in our multidimensional scaling analysis of a dissimilarity matrix. We've used "dist()" to create the matrix and "cmdscale()" for the scaling. In order to determine the number of dimensions we would like to plot stress vs. dimensions. However, we cannot find a pre-made command. It seems that other programs may test stress as part of the algorithm as opposed to cmdscale() which allows us to chose the number of dime...
2002 Dec 19
1
newbie question on dist
hi, i have just begun using R, so please bear with me. i am trying to use cmdscale and display the result. i read the data using read.table(), calculate the proximity matrix using dist() and the display the result using the cmdscale(). this is very fine. in addition, i want the display to distinguish between two classes of records in my data. i have my data records marked as...
2004 Dec 09
1
more clustering questions
...s2 is related similarly at some medium level to s1 and s5. i converted this into a dissimilarity matrix with R using dissmini <- max(mini)-mini this results in: s1 s2 s3 s4 s5 s1 0 5 10 2 3 s2 5 0 10 10 5 s3 10 10 0 10 10 s4 2 10 10 0 10 s5 3 5 10 10 0 if I then do plot(cmdscale(dissmini), type="n"); text(cmdscale(dissmini), row.names(cmdscale(dissmini))) I end up with a plot that shows (among other things) s2 and s5 very close together, closer together than s1-s5 or s1-s2 or s1-s4. This is the opposite of what I would predict and what I want the plot to sh...
2002 Jan 10
1
Size of type double in object type dist (PR#1255)
The following problem occurs in R 1.4.0 and 1.3.1 for Windows95, but not in R 1.2.0 for Windows95. The problem does not occur in R 1.4.0 for Linux PC, Linux Alpha and HP-UX. Sometimes, the type of 'Size' of an object of type 'dist' changes from integer into double. Running cmdscale on such a 'dist' object gives invalid results. I don't know what should be considered a bug, the type of 'Size' changing into 'double', or cmdscale not able to process a 'dist' object with a 'Size' of type 'double'. Perhaps both. I have not been...
1997 Oct 20
0
R-beta: problem with cmdscale in rseptbeta for W95
I'm using rseptbeta for w95, I tried to do: library(mva) data(quakes) quakes<-quakes[sample(seq(1:1000),100),1:5] cmd.dsq<-cmdscale(dsq) Error in .C("dblcen", x, as.integer(n)) : C/Fortran function not in load table how can I solve this problem? Andrea Rossetti _______________________________________________________ Statistica & Informatica per la Gestione delle Imprese | Universit? degli Studi di Perugia (Itali...
1997 Oct 24
0
R-beta: Problem with cmdscale on R for W95
I'm using rseptbeta for w95, I tried to do: > library(mva) > data(eurodist) > cmdscale(eurodist) Error in .C("dblcen", x, as.integer(n)) : C/Fortran function not in load table > how can I solve this problem? Andrea Rossetti _______________________________________________________ Statistica & Informatica per la Gestione delle Imprese | Universit? degli Studi di Peru...
1997 Dec 10
0
R-beta: Re: problem vith "cmdscale" on W95
I'm using the WINDOWS 95 version of R (with midified menu "exe.zip"): I tried to do library(mva) data(quakes) quakes<-quakes[sample(seq(1:1000),100),1:5] cmd.dsq<-cmdscale(dsq) Error in .C("dblcen", x, as.integer(n)) : C/Fortran function not in load table how can I solve this problem? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info&qu...