CBI: Clutton-Brock et al 1979 index (CBI)

View source: R/CBI.R

CBIR Documentation

Clutton-Brock et al 1979 index (CBI)

Description

Clutton-Brock et al 1979 index (CBI)

Usage

CBI(mat)

Arguments

mat

matrix

Details

The results of this function diverge from published examples in some cases. While the function produces identical scores as the results in \insertCitegammell2003;textualEloRating and \insertCitedevries2000;textualEloRating there are some slight deviations for the example in \insertCitewhitehead2008;textualEloRating. The final example from \insertCitebang2010;textualEloRating is fairly off, but that seems to be because these authors might have applied different definitions: \insertCitebang2010;textualEloRating talk about 'who dominates' while \insertCiteclutton-brock1979EloRating consider 'who won interactions', which are two very different conceptualizations, and which might explain the discrepancies.

Value

a named numeric vector with the indices for each individual

Author(s)

Christof Neumann

References

\insertRef

clutton-brock1979EloRating

\insertRef

bang2010EloRating

\insertRef

gammell2003EloRating

\insertRef

devries2000EloRating

\insertRef

whitehead2008EloRating

Examples

# example from Gammell et al 2003 (table 1)
m <- matrix(0, nrow = 5, ncol = 5)
m[upper.tri(m)] <- 100
m[1, 5] <- 99
m[5, 1] <- 1
colnames(m) <- rownames(m) <- c("r", "s", "t", "u", "v")
m
CBI(m)

# example from Whitehead 2008 (table 5.8, 5.9)
m <- c(0, 2, 0, 5, 2, 2, 1, 0, 2, 0,
       0, 0, 2, 2, 1, 0, 3, 2, 1, 1,
       0, 1, 0, 1, 1, 3, 1, 1, 4, 0,
       0, 0, 0, 0, 1, 1, 1, 0, 1, 0,
       0, 0, 0, 0, 0, 7, 1, 4, 2, 3,
       0, 0, 0, 0, 0, 0, 2, 3, 6, 10,
       0, 1, 1, 0, 2, 0, 0, 0, 0, 2,
       0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
       0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
mat <- matrix(m, nrow = 10, byrow = TRUE)
colnames(mat) <- rownames(mat) <- c("x907", "x915", "x912", "x910", "x917",
                                    "x898", "x897", "x911", "x904", "x902")
round(CBI(mat), 2)
# results in book:
# 33, 2.75, 3.08, 0.91, 0.86, 0.82, 0.92, 0.53, 0.23, 0.03

simple_dom(mat2seq(mat)$winner, mat2seq(mat)$loser)

# example from Bang et al 2010 (table 1)
m <- c(0, 1, 0, 2,
       1, 0, 4, 0,
       2, 2, 0, 3,
       3, 0, 1, 0)
m <- matrix(m, ncol = 4, byrow = TRUE)
m <- t(m)
colnames(m) <- rownames(m) <- letters[1:4]
CBI(m)
# results in paper:
# 1.43, 1, 0.7, 1

# and from de Vries and Appleby (2000, table 4)
m <- c(0, 1, 1, 4, 0, 3, 6,
       0, 0, 1, 4, 0, 0, 0,
       0, 0, 0, 1, 1, 3, 14,
       0, 0, 0, 0, 2, 2, 1,
       0, 0, 0, 0, 0, 17, 2,
       0, 0, 0, 0, 0, 0, 12,
       0, 0, 0, 0, 0, 0, 0)
m <- matrix(m, ncol = 7, byrow = TRUE)
colnames(m) <- rownames(m) <- letters[1:7]
CBI(m)
simple_dom(mat2seq(m)$winner, mat2seq(m)$loser)

gobbios/EloRating documentation built on July 19, 2024, 4:05 a.m.