DS: calculate David's scores

Description Usage Arguments Value Author(s) References Examples

View source: R/DS.R

Description

calculate David's scores

Usage

1
DS(interactionmatrix, prop=c("Pij", "Dij"))

Arguments

interactionmatrix

square interaction matrix with winner in rows and losers in columns, for example the output from creatematrix

prop

the type of dyadic win proportion to be use. By default corrected for number of interactions in a dyad, otherwise the raw proportion

Value

a data.frame with columns ID, DS (David's scores) and normDS (normalized David's scores)

Author(s)

Christof Neumann

References

David, H. A. 1987. Ranking from unbalanced paired-comparison data. Biometrika, 74, 432-436.

Gammell, M. P., de Vries, H., Jennings, D. J., Carlin, C. M. and Hayden, T. J. 2003. David's score: a more appropriate dominance ranking method than Clutton-Brock et al.'s index. Animal Behaviour, 66, 601-605.

de Vries, H., Stevens, J. M. G. and Vervaecke, H. 2006. Measuring and testing the steepness of dominance hierarchies. Animal Behaviour, 71, 585-592.

Examples

1
2
3
4
data(adv)
SEQ <- elo.seq(winner=adv$winner, loser=adv$loser, Date=adv$Date)
mat <- creatematrix(SEQ)
DS(mat)

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

[1] "loop 1: Elo calculations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |....                                                                  |   6%
  |                                                                            
  |......                                                                |   9%
  |                                                                            
  |........                                                              |  12%
  |                                                                            
  |...........                                                           |  15%
  |                                                                            
  |.............                                                         |  18%
  |                                                                            
  |...............                                                       |  21%
  |                                                                            
  |.................                                                     |  24%
  |                                                                            
  |...................                                                   |  27%
  |                                                                            
  |.....................                                                 |  30%
  |                                                                            
  |.......................                                               |  33%
  |                                                                            
  |.........................                                             |  36%
  |                                                                            
  |............................                                          |  39%
  |                                                                            
  |..............................                                        |  42%
  |                                                                            
  |................................                                      |  45%
  |                                                                            
  |..................................                                    |  48%
  |                                                                            
  |....................................                                  |  52%
  |                                                                            
  |......................................                                |  55%
  |                                                                            
  |........................................                              |  58%
  |                                                                            
  |..........................................                            |  61%
  |                                                                            
  |.............................................                         |  64%
  |                                                                            
  |...............................................                       |  67%
  |                                                                            
  |.................................................                     |  70%
  |                                                                            
  |...................................................                   |  73%
  |                                                                            
  |.....................................................                 |  76%
  |                                                                            
  |.......................................................               |  79%
  |                                                                            
  |.........................................................             |  82%
  |                                                                            
  |...........................................................           |  85%
  |                                                                            
  |..............................................................        |  88%
  |                                                                            
  |................................................................      |  91%
  |                                                                            
  |..................................................................    |  94%
  |                                                                            
  |....................................................................  |  97%
  |                                                                            
  |......................................................................| 100%
[1] "loop 2: Stability calculations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |....                                                                  |   6%
  |                                                                            
  |......                                                                |   9%
  |                                                                            
  |........                                                              |  12%
  |                                                                            
  |...........                                                           |  15%
  |                                                                            
  |.............                                                         |  18%
  |                                                                            
  |...............                                                       |  21%
  |                                                                            
  |.................                                                     |  24%
  |                                                                            
  |...................                                                   |  27%
  |                                                                            
  |.....................                                                 |  30%
  |                                                                            
  |.......................                                               |  33%
  |                                                                            
  |.........................                                             |  36%
  |                                                                            
  |............................                                          |  39%
  |                                                                            
  |..............................                                        |  42%
  |                                                                            
  |................................                                      |  45%
  |                                                                            
  |..................................                                    |  48%
  |                                                                            
  |....................................                                  |  52%
  |                                                                            
  |......................................                                |  55%
  |                                                                            
  |........................................                              |  58%
  |                                                                            
  |..........................................                            |  61%
  |                                                                            
  |.............................................                         |  64%
  |                                                                            
  |...............................................                       |  67%
  |                                                                            
  |.................................................                     |  70%
  |                                                                            
  |...................................................                   |  73%
  |                                                                            
  |.....................................................                 |  76%
  |                                                                            
  |.......................................................               |  79%
  |                                                                            
  |.........................................................             |  82%
  |                                                                            
  |...........................................................           |  85%
  |                                                                            
  |..............................................................        |  88%
  |                                                                            
  |................................................................      |  91%
  |                                                                            
  |..................................................................    |  94%
  |                                                                            
  |....................................................................  |  97%
  |                                                                            
  |......................................................................| 100%
  ID         DS   normDS
1  c  11.333333 4.619048
2  b   9.666667 4.380952
3  d   8.333333 4.190476
4  f  -4.333333 2.380952
5  e  -5.000000 2.285714
6  g  -6.666667 2.047619
7  a -13.333333 1.095238

EloRating documentation built on May 29, 2017, 7:14 p.m.