rankplot: Visualizing rankings of 3 or 4 items by plot.

View source: R/rankplot.R

rankplotR Documentation

Visualizing rankings of 3 or 4 items by plot.

Description

Display rankings of 3 items by hexagon and 4 items by truncated octahedron. Each line linking two points represents a Kendall distance of one. The size of the point is proportional to the frequency of that particular ranking.

Usage

rankplot(dset,trans=FALSE,label.type="item", circle.col="black", circle.bg=FALSE)

Arguments

dset

a ranking dataset

trans

(For 4-item ranking dataset) Another representation of the rankings.

label.type

The type of label for rankings to be displayed (default is item). ranking : ranking, ordering: ordering with item numbers, item: ordering with alphabets

circle.col

The colour of the circles (default is black).

circle.bg

The colour of the background of the circles (default is none).

Details

As a ranking dataset of k items can be represented in k-1 dimensions, ranking data with 3 or 4 items can be represented in graphs without losing any information. For visualization of ranking data with more items, multidimensional preference analysis can be used.

Author(s)

Paul H. Lee and Philip L. H. Yu

References

Thompson, G. L. (1993). Graphical techniques for ranked data. In Fligner, M. A., and Verducci, J. S. (eds.) Probability Models and Statistical Analyses for Ranking Data, pp. 294-298.

Examples

## create an artificial dataset
X1 <- c(1,1,2,2,3,3)
X2 <- c(2,3,1,3,1,2)
X3 <- c(3,2,3,1,2,1)
n <- c(6,5,4,3,2,1)
test <- data.frame(X1,X2,X3,n)

## plotting the artificial dataset in a hexagon
## rankplot(test)

pmr documentation built on June 24, 2022, 5:06 p.m.