tags:

views:

69

answers:

3

Hi I am making a report of a survey where we have what we call a "radiomatrix" and it looks like this.

alt text

Then we import the answers is a table in R into something that looks like this:

user    tiramisu  cupcake   chocolate  carrot
test01  loves_it  loves_it  loves_it   hate_it
test02  likes_it  likes_it  loves_it   likes_it
test03  likes_it  loves_it  loves_it   hate_it

What would be the best and most meaningful graphical representation for this?

A: 

There isn't a "best" representation for any given set of data. It depends on what you're trying to show. Some examples:

  • If you want to test the hypothesis that people are extreme about their cake preferences -- that is, that there are very few likes vs. loves/hates -- you could show a plot of preference intensity versus quantity.

  • If you want to show that chocolate is more preferred than tiramisu, you could use a simple table that assigns -1 to "hate", 0 to "like", and 1 to "love" to come up with a mean/median score for each dessert.

John Feminella
What about a multiple histogram, as a barplot ? as in this one: http://img532.imageshack.us/img532/7253/screenshot20100622at120.png
Libo Cannici
Those are fine, but consider a table if you're just showing numbers, particularly if there's more than a handful of different cake choices. A bar graph wastes a lot of visual space and is an inefficient representation of data -- for instance, it's not possible to have "2.99" votes for cupcakes, but that's what is suggested when you use one.
John Feminella
A: 

A mosaic plot might be interesting. See here (PDF) for examples.

Karsten W.
That looks interesting... any example that shows how to generate in R something like this given the table above?
Libo Cannici
+3  A: 

One of the things I would do is to constract a contingency table and then perform correspondence analysis (look fot it here), to produce something like this

Another one is that I would try to show correlations between preferences (something like this)

Perhaps one could also mine association rules, e.g.

If Loves Tiramisu then hates Cupcake

If you would like to create mosaic plots with R, check out this.

gd047