Displaying 20 results from an estimated 3000 matches similar to: "How does clusplot exactly make use of cmdscale?"
2011 Nov 04
1
How to use 'prcomp' with CLUSPLOT?
Hello,
I have a large data set that has more columns than rows (sample data below). I am trying to perform a partitioning cluster analysis and then plot that using pca. I have tried using CLUSPLOT(), but that only allows for 'princomp' where I need 'prcomp' as I do not want to reduce my columns. Is there a way to edit the CLUSPLOT() code to use 'prcomp', please?
#
2005 May 23
1
Can't reproduce clusplot princomp results.
Dear R folk:
Perhaps I'm just dense today, but I am having trouble reproducing the
principal components plotted and summarized by clusplot. Here is a brief
example using the pluton dataset. clusplot reports that the first two
principal components explain 99.7% of the variability. But this is not what
princomp is reporting. I would greatly appreciate any advice.
With best regards,
-- Tom
2011 Dec 06
1
Problem with clusplot
Dear all
I'm trying to run a cluster analysis with R
Here are the commands:
mydata <- na.omit(matrix) # listwise deletion of missing
mydata <- scale(matrix) # standardize variables
fit <- kmeans(mydata, 8) # 8 cluster solution
# get cluster means
aggregate(mydata,by=list(fit$cluster),FUN=mean)
# append cluster assignment
mydata <- data.frame(mydata, fit$cluster)
2002 Jan 07
3
cluster - clusplot.default (PR#1249)
The following code in clusplot.default (package cluster) is in error:
x1 <- cmdscale(x, k = 2, eig = TRUE)
var.dec <- sum(x1$eig)/sum(diag(x1$x))
if (var.dec < 0)
var.dec <- 0
if (var.dec > 1)
var.dec <- 1
x1 <- x1$points
x1 has components with names "points" and "eig", not "x", so
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
2008 Mar 06
2
Clustering large data matrix
Hello,
I have a large data matrix (68x13112), each row corresponding to one
observation (patients) and each column corresponding to the variables
(points within an NMR spectrum). I would like to carry out some kind of
clustering on these data to see how many clusters are there. I have
tried the function clara() from the package cluster. If I use the matrix
as is, I can perform the clara
1999 Oct 07
1
[Fwd: Libraries loading, but not really?] - it really IS a problem :-(
kalish at psy.uwa.edu.au wrote:
>
> I'm a newbie at R, and can't get libraries to really work.
> I did this:
> > library(help = mva)
> cancor Canonical Correlations
> cmdscale Classical (Metric) Multidimensional Scaling
> dist Distance Matrix Computation
> hclust Hierarchical Clustering
2011 Sep 23
0
Clusplot axes
I am a relative novice with R and am having some difficulty using 'clusplot'
(package Cluster).
I have performed PCA analysis (using vegan) on a large set of morphometric
measurements and revealed up to 4 principal components. To examine the
grouping of the data I have used PAM followed by clusplot to visualise the
clusters. My problem is that I would like to see the clusters plotted on
2009 Aug 18
0
Help with identify() points on a PAM clusplot
I created a clusplot from PAM results. It represents how signals have been classified.
Signals are identified by a numerical label.
My trial distance matrix is made up of 10 rows, one for eacjh signal.
I assigned the signals iidentifiers as rownames of the distance matrix.
rwn
[1] "1104" "1332" "2057" "2425" "2483" "2530"
2007 Oct 04
0
??clusplot
Hi there,
I want to do classify some 2-dimensional points into four clusters by
pam() in the cluster package. However, I encountered some problems.
1. How can I change the "xlab" and "ylab" instead of the default
"Component 1" and "Component 2"? When I put "xlab" option in the
function, it always says "formal argument "xlab"
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,
2nd ed., p 38, would
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
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)
However, this works:
cmdscale(as.matrix(d))
My suggestion is to change, in
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
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
2009 Jan 31
1
Extracting coordinates for cluster::clusplot()
Dear Friends,
require(cluster)
x <- rbind(cbind(rnorm(10, 0, 0.5), rnorm(10, 0, 0.5)),
cbind(rnorm(15, 5, 0.5), rnorm(15, 5, 0.5)))
plot(pp <- pam(x, 2), which.plots = 1)
How can I extract the coordinates used in the plot?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
Postal Address:
P.O.Box 400400, Charlottesville, VA 22904-4400
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) <-
2013 Apr 26
1
prcomp( and cmdscale( not equivalent?
Hello,
I have a dilemma that I'm hoping the R gurus will be able to help resolve.
For background:
My data is in the form of a (dis)similarity matrix 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
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 the one above)
2008 Dec 10
1
convert dataframe to matrix for cmdscale
I have a dataframe like this (toy example):
x y z
"a" "a" 0
"a" "b" 1
"a" "c" 2
"b" "a" .9
"b" "b" 0
"b" "c" 1.3
"c" "a" 2.2
"c" "b" 1.1
"c" "c" 0
The observations are from a matrix like this:
c 2.2 1.1 0.0
b 0.9 0.0