Description Usage Arguments Details Value References Examples
Calculates the David's Score of players in an "interData" object.
1 | davidScore(intData, corrected = FALSE, normalize = FALSE)
|
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). |
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.
A 2 column data frame specifying the players used in the algorithm sorted by their corresponding david's score.
Gammel et al. (2003) David's Score. Animal Behaviour. de Vries et al (2006). Measuring and testing the steepness of dominance hierarchies. Animal Behaviour.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.