Hi Sir How to perform cluster analysis using Ward's method and K- means clustering? Regards -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. [[alternative HTML version deleted]]
On 10/18/07, amna khan <amnakhan493 at gmail.com> wrote:> Hi Sir > > How to perform cluster analysis using Ward's method and K- means clustering?For beginning, try to perform it using the GUI Rcmdr. Regards, Liviu
Hi Amna, I believe you are looking for these functions ?hclust [with method = "ward"] ?kmeans Best regards, Stephen --- amna khan <amnakhan493 at gmail.com> wrote:> Hi Sir > > How to perform cluster analysis using Ward's method and K- means > clustering? > > Regards > > -- > AMINA SHAHZADI > Department of Statistics > GC University Lahore, Pakistan. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Dear all, I would like to know if I can do a hierarchical cluster analysis in R using my own similarity matrix and how. Thanks. Katia Freire. [[alternative HTML version deleted]]
Hi all, Sorry for reposting, but I think my last request was a little confusing. I am trying to keep my x windows open after I exit the R session, so when I have produced a series of plots from R I would like to retain the graphics as x windows after exiting with q(). This would be particularly useful for batch mode execution of R scripts; at the moment when I run scripts with R CMD BATCH myscript.R my graphics flash up in the x window momentarily, but disappear as R exits (providing x11 is running and I use Sys.setenv("DISPLAY"=":0.0") before opening x with x11()). Is it possible to retain these (as it is in GNUPLOT using the persist option), both in interactive and batch mode? I am able to keep the plot open for examination by adding a long serial loop to the end of the script, but this is not a particularly good solution. I am able to save the contents of the x windows as pdf, bmp etc with dev.print(), but I would rather retain the graphics in an open x window, so I could keep the plots on screen after a system call to R from other programs. Many thanks Luke Spadavecchia PS. I am running R-2.4.1 on Mac OS X (intel processor), and Windows XP with the same results on both systems
take a look at hclust() Dieter Katia Freire wrote:> Dear all, > > I would like to know if I can do a hierarchical cluster analysis in R using my own similarity matrix and how. Thanks. Katia Freire. > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
> Subject: [R] Cluster Analysis > > Dear all, > > I would like to know if I can do a hierarchical cluster analysis in R > using my own similarity matrix and how. Thanks. Katia Freire.Yes. ;) Reading the help for dist() and hclust() should make the procedure for doing this appear fairly straightforward. For interpreting the results, cutree() should be helpful.. --elijah
Hi Sir How can we select the optimum number of clusters? Best Regards -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. [[alternative HTML version deleted]]
AMINA SHAHZADI, The eternal question. What I do is that I generate a range of solutions, profile them on variables used to cluster the data into groups and any other information I have to profile the cluster groups on and then present the solutions to a group of others to assess meaningfulness, debate on the solutions and attempt to reach a consensus etc In many cases, eg, for algorithms based on k-means and hierarchical clustering, you are using an exploratory technique and there are no right/wrong answers to this Having used cluster analysis for years some things to look at because there is no way to answer this statistically (unless you are using a latent class type model with goodness of fit measures) are the following 1. What is the minimum size you believe to be robust for a single cluster (eg n=30, n=100) etc because the larger the number of clusters you generate relative to sample size, the smaller your clusters will be and there must be a cut-off point defined upon which you are not prepared to go any lower... 2. If you run the clusters through different algorithms, how comparable are the results (cluster stability) 2. What differences emerge between 2, 3, 4 cluster solutions etc (as you utilise larger numbers of clusters, does this still produce a meaningful result in that the clusters are distinct and unique, or are you just cutting larger clusters into smaller clusters without generating unique and usable information... Examine the clusters via a series of cross tabs (as you go from 2 to 3 to 4 cluster solutions) what happens to the members within clusters, are they distributed differently etc Thanks Paul ----- Original Message ----- From: "amna khan" <amnakhan493 at gmail.com> To: <R-help at stat.math.ethz.ch> Sent: Friday, November 02, 2007 2:19 AM Subject: [R] cluster analysis> Hi Sir > > How can we select the optimum number of clusters? > > Best Regards > > -- > AMINA SHAHZADI > Department of Statistics > GC University Lahore, Pakistan. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >