Learn R Programming

ExtMallows (version 0.1.0)

corrRankings: p value for measuring the correlation of pairwise rankings

Description

It caclulates the p values that measure the correlation of pariwise rankings.

Usage

corrRankings(rankings)

Arguments

rankings

A n by m data frame, with each column representing a ranking list, which ranks the items from the most preferred to the least preferred. For missing items, use 0 to denote them.

Value

pair.pvalue

a symmetric matrix of p values, with the (i,j)-th element denoting the p value of the i,j-th rankings.

References

An extended Mallows model for ranked data aggregation

Examples

Run this code
# NOT RUN {
data(simu3)
pvalue=corrRankings(rankings = simu3)

#threshold the p values

threshold=0.05
pvalue.trunc=ifelse(pvalue<=0.05, pvalue, 1)

#plot the p values

x=y=1:ncol(pvalue)
par(mfrow=c(1,2))
image(x, y, pvalue, xlab = NA, ylab = NA, sub = "rank coefficient")
image(x, y, pvalue.trunc, xlab = NA, ylab = NA, sub = "rank coefficient < 0.05")

# }

Run the code above in your browser using DataLab