On Sun, 15 Feb 2009, achristoffersen wrote:
Dear Sirs and madams :-) I am trying to teach myself multidimensional scaling. To that effect I have collected a survey asking people to rank 10 philosophers and politicians according to their preference. I have collected 61 answers. The data is organized in ten columns and 61 rows. the columns are "choice_1", "choice_2", "choice_3" etc. The cells is the name of the philosopher I guess I need to put the data in some other format, e.g. with colloumns: "philospher_1", "philospher_2", "philospher_3" etc. and then have the cell hold the particular ranking (score) for that philospher (i.e. a number between 1:10) I guess such a transformation would also allow me to do clusteranalysis? - But how to do it???
Something like dat <- t( apply( your.data, 1 , order ) ) colnames(dat) <- paste( 'philosopher', 1:10, sep='_' ) HTH, Chuck
Anyways: what I have done so far is to compute a 10*10 matrix in a spreadsheet application. I do this by countif(range_choice1=philospher1)*10 for each philospher. In “range_choice2” I multiply by 9, and in “range_choice3” I multiply with 8 etc. The corresponding matrix I import to r and do dist(t(matrix) and then I use cmdscale$points to draw a plot. It looks nice but I am almost sure I'm doing it wrong. And I would certainly like not having rely on a spreadsheet. So my question is: how to transform the data, and is it true that my current 'spreadsheet' method is wrong? Also: should consider discarting some data, e.g. only using the top 3 choices? Cheers in advance. Andreas -- View this message in context: http://www.nabble.com/MDS-with-ranking-data-%28and-transformation%29-tp22025457p22025457.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.
Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
______________________________________________ R-help@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.