generateC: Generate a matrix of pairwise wins

Description Usage Arguments Value Examples

View source: R/Helpers.R

Description

This function takes in data that has been broken up into pair format. The user is given a matrix C, where element C[i, j] represents (if normalized is FALSE) exactly how many times alternative i has beaten alternative j (if normalized is TRUE) the observed probability that alternative i beats j

Usage

1
generateC(Data.pairs, m, weighted = FALSE, prior = 0, normalized = TRUE)

Arguments

Data.pairs

the data broken up into pairs

m

the tot al number of alternatives

weighted

whether or not this generateC should use the third column of Data.pairs as the weights

prior

the initial "fake data" that you want to include in C. A prior of 1 would mean that you initially "observe" that all alternatives beat all other alternatives exactly once.

normalized

if TRUE, then normalizes entries to probabilities

Value

a Count matrix of how many times alternative i has beat alternative j

Examples

1
2
3
data(Data.Test)
Data.Test.pairs <- Breaking(Data.Test, "full")
generateC(Data.Test.pairs, 5)

StatRank documentation built on May 1, 2019, 8:22 p.m.