toDomMat: Convert interData object to dominance matrix

Description Usage Arguments Details Value References Examples

Description

Creates a matrix cataloging 'dominance' between players in an interData object.

Usage

1
toDomMat(intData)

Arguments

intData

object of class "interData" to build the matrix

Details

toDomMat creates a matrix which uses players from intData as row and column names. A cell is given a value of 1 if the player in the row is dominant to the player in the column, a value of .5 if there was an equal number of win-loss interactions and NA for all other instances. Because this matrix is used in I&SI calulations as outlined by Han de Vries 1998 draws are ignored.

Value

a matrix indicating player wins

a dominance matrix

References

Han de Vries (1998) Finding a Dominance Order Most Consistant with a Linear Hierarchy.

Examples

1
2
3
4
5
6
7
8
9
# generate generic data
interactions <- data.frame (a = sample (letters [1:10], 100, T),
                            b = sample (letters [1:10], 100, T),
                            o = sample (c(-1,-1,0,1,1), 100, T),
                            d = Sys.time () + runif (100, 40, 160))
# convert to interData object
id1 <- intTableConv (interactions)
# calculate dominance matrix using all players
toDomMat (id1)

nmmarquez/linHierarchy documentation built on May 23, 2019, 9:28 p.m.