condorcet: Find a Condorcet Choice.

View source: R/condorcet.r

condorcetR Documentation

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

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.

Value

...

References

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

See Also

Pmaker()

Examples


data(city)
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



dkahle/algstat documentation built on May 23, 2023, 12:29 a.m.