davidScore: Calculate the David's Score of players

Description Usage Arguments Details Value References Examples

Description

Calculates the David's Score of players in an "interData" object.

Usage

1
davidScore(intData, corrected = FALSE, normalize = FALSE)

Arguments

intData

object of class "interData" to calculate scores.

corrected

specify wether to use David's adjustment for chance.

normalized

specify wether to use a normalizing factor detailed in de Vries et al (2006).

Details

Using the methods outlined in Gamel et al. 2003 and de Vries et al. 2006 a David's score is calculated using interactions from intData. Adjusting the corrected parameter will modify the algorithm to use David's adjustment for chance.

Value

A 2 column data frame specifying the players used in the algorithm sorted by their corresponding david's score.

References

Gammel et al. (2003) David's Score. Animal Behaviour. de Vries et al (2006). Measuring and testing the steepness of dominance hierarchies. Animal Behaviour.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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 David's Score
davidScore (id1)
# with David's adjustment for chance
davidScore (id1, corrected = TRUE)

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