rankAg: Ranking aggregation of triple comparisons

Description Usage Arguments Value Examples

View source: R/rankAg.R

Description

Ranking aggregation using Bradley-Terry model, Plackett-Luce model, Thurstone model, Multinomial Preference model and linear model. This is the wrapper function for rankLM, sgdBT, sgdPL, sgdThurs and sgdMPM.

Usage

1
rankAg(data, K = NA, method)

Arguments

data

a n * m matrix, where n is the number of observers and m is the number of items to rank; each row vector is a partial ranking (triple comparisons), with i-th element being the rank assined to item i; the entry where that item is not ranked in the partial ranking is replaced by 0

K

the additive relationship matrix; all methods must specify K except LM

method

one of "BT", "PL", "TH", "MPM", "LM"

Value

Return a list with two components:

ranks

a vector where the i-th element is the rank assigned to the i-th item.

ranking

a vector where the i-th element is the item ranked in the i-th place

Examples

1
2
3
4
5
6
7
#synthetic ranking data
data = rbind(c(3,1,2), c(3,1,2), c(3,2,1))
#use identity relationship matrix
K = diag(1, 3)

#rank aggregation
rankAg(data, K, method = 'TH')

shuxiaoc/agRank documentation built on May 29, 2019, 9:27 p.m.