algstat (version 0.0.2)

condorcet: Find a Condorcet Choice.

Description

Try to compute find a Condorcet choice given a full ranking of m objects.

Usage

condorcet(data, names)

Arguments

data
the data, a vector of counts of each permutation of the m objects (m is the length of data)
names
character vector of the names of the m objects

Value

...

Details

In a ranking of m objects, the Condorcet choice is the choice that wins over every other choice in pairwise comparisons. See Marden (1995), p.20 for details.

References

Marden, J. I. (1995). Analyzing and Modeling Rank Data, London: Chapman & Hall. p.20.

See Also

Pmaker

Examples

Run this code
data(city)

condorcet(city[,"city"], colnames(city))    # among city-dwellers
condorcet(city[,"suburb"], colnames(city))  # among suburb-dwellers
condorcet(city[,"country"], colnames(city)) # among country-dwellers
condorcet(rowSums(city), colnames(city))    # overall winner

Run the code above in your browser using DataCamp Workspace