ds: Get David's Scores of Individuals

Description Usage Arguments Value References Examples

View source: R/ds.R

Description

Get David's Scores of Individuals

Usage

1
ds(m, norm = FALSE, type = "D")

Arguments

m

A matrix with individuals ordered identically in rows and columns.

norm

whether to normalize scores

type

either method="D" for Dij or method="P" for Pij.

Value

a vector of David scores in same order as names of m.

References

Gammell et al, 2003, David's score: a more appropriate dominance ranking method than Clutton-Brock et al.'s index, Animal Behaviour.

Examples

1
2
3
4
5
6
m <- matrix(c(NA,2,30,6,19,122,0,NA,18,
0,19,85,0,1,NA,3,8,84,0,0,0,NA,267,50,0,
0,0,5,NA,10,1,0,4,4,1,NA), ncol=6)  #table 2, Vervaecke et al. 2000  - fleeing in bonobos
ds(m)
ds(m,type="P")
ds(m,norm=TRUE)

Example output

[1] -12.4901690  -6.2706524  -2.2100701   0.4940695   8.0409341  12.4358879
[1] -13.951220  -5.776667  -2.990431   1.502107   8.453543  12.762667
[1] 0.4183052 1.4548913 2.1316550 2.5823449 3.8401557 4.5726480

compete documentation built on May 29, 2017, 1:39 p.m.