Hi R-users I have a data set. There are 10 products and the numbers of people who ranked the products. The format of the data set is productID rank1 rank2 rank3 rank4 rank5 rank6 rank7 rank8 rank9 rank10 ------------------------------------------------------------------------------------------------------- 1 10 2 3 3 6 4 2 5 24 6 8 7 3 8 8 9 4 10 5 Each cell has the number of people who ranked the product. For example, 4 people who ranked 9th product best. I would like to know how to summarze this data using some R functions. My goal is to figure out what is the best product based on the ranking information. Easy one is to look at only rank1 column, then I do not utilize all information the data have. I can also do this. For each product, the number of people * rank scores and then pick lowest number for the best product. Is there any other way I can summarize this data? Any suggestion for R fundtions or statistical methos will be appreciated. Taka, _________________________________________________________________ Get today's hot entertainment gossip http://movies.msn.com/movies/hotgossip
Gabor Grothendieck
2006-Sep-19 17:50 UTC
[R] looking for some functions to analyze a data set.
You could use the weighted mean (?weighted.mean) or weighted median (?wtd.quantile in package Hmisc). On 9/19/06, Taka Matzmoto <sell_mirage_ne at hotmail.com> wrote:> Hi R-users > I have a data set. There are 10 products and the numbers of people who > ranked the products. > > The format of the data set is > > productID rank1 rank2 rank3 rank4 rank5 rank6 rank7 rank8 rank9 rank10 > ------------------------------------------------------------------------------------------------------- > 1 10 > 2 3 > 3 6 > 4 2 > 5 24 > 6 8 > 7 3 > 8 8 > 9 4 > 10 5 > > Each cell has the number of people who ranked the product. For example, 4 > people who ranked 9th product best. > > I would like to know how to summarze this data using some R functions. My > goal is to figure out what is the best product based on the ranking > information. > > Easy one is to look at only rank1 column, then I do not utilize all > information the data have. > I can also do this. For each product, the number of people * rank scores and > then pick lowest number for the best product. > > Is there any other way I can summarize this data? > > Any suggestion for R fundtions or statistical methos will be appreciated. > > Taka, > > _________________________________________________________________ > Get today's hot entertainment gossip http://movies.msn.com/movies/hotgossip > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >
Taka Matzmoto <sell_mirage_ne <at> hotmail.com> writes:> Hi R-users > I have a data set. There are 10 products and the numbers of people who > ranked the products........> > Is there any other way I can summarize this data?Be sure to know what assumptions are implicit in the procedures you are using to do this. Any procedure you use will violate some assumption that seems quite intutively appealing. Anupam.