calculate Elo ratings from a sequence of dominance interactions
.elo.seq_old(
winner,
loser,
Date,
draw = NULL,
presence = NULL,
startvalue = 1000,
k = 100,
normprob = TRUE,
init = "average",
iterate = 0,
runcheck = TRUE,
progressbar = FALSE
)
An object of class elo
, which is list with 10 items that serves as basis to extract relevant information:
a date by ID-matrix
with raw Elo ratings
a date by ID-matrix
with raw Elo ratings
a date by ID-matrix
with raw Elo ratings
a date by ID-matrix
with with presence data
a date by ID-matrix
containing the number of interactions a given ID was involved in on a given day
details on each single interaction
a data.frame
containing information about stability (see stab_elo
)
vector of class Date
covering the ranges of dates in the dataset
various
a (sorted) character vector with all IDs that occur in the dataset
either a factor or character vector with winner IDs of dyadic dominance interactions
either a factor or character vector with loser IDs of dyadic dominance interactions
character vector of form "YYYY-MM-DD" with the date of the respective interaction
logical, which interactions ended undecided (i.e. drawn or tied)? By default all FALSE
, i.e. no undecided interactions occurred. Note that in this case, winner
/loser
values can be interchanged
optional data.frame, to supply data about presence and absence of individuals for part of the time the data collection covered. see details
the value of Elo ratings of the two individuals that are involved in the first interaction of the overall sequence prior to this interaction. By default set to 1000. See also init
factor k that determines the maximum change in ratings. By default k=100
logical (by default TRUE
). Should a normal curve be assumed for calculating the winning/losing probablities, or a logistic curve. See winprob
for details
character, what Elo rating does an individual have prior to its first interaction. Three options are available:
average
: individuals always start with the value specified in startvalue
. Given stable composition of the group, this also reflects the average Elo rating on each day in that group,
bottom
: subjects entering at the current lowest Elo value if the lowest value getting lower its getting lower for all subjects which had this lowest values before, it is reflecting that in some species new subjects entering a group at the bottom level "bottom entry"
bottom_low
: same as bottom
but additionally the start values getting after the first interaction lower for all non-interacting subjects and, reflecting that we have at start no knowledge about the subjects this option offers for "bottom entry" species the possibility to consider that in a way that those subjects which are not interacting getting lower from start on
not yet implemented
logical, should several checks regarding data integrety be performed, by default TRUE
. See seqcheck
logical, should progress bars be displayed, by default progressbar=TRUE
Christof Neumann and Lars Kulik
the presence 'matrix' is actually an object of class data.frame
containing information about wether an individual was present on a given day or not. The first column represents the dates, running at least from the date of the earliest interaction until at least the date of the last interaction with one line per day (regardless of whether there were actually interactions observed on each day). Further, each individual is represented as a column in which "1" indicates an individual was present on the row-date and a "0" indicates the individuals absence on this date. NA
s are not allowed. See advpres
for an example.
Elo, A. E. 1978. The Rating of Chess Players, Past and Present. New York: Arco.
Albers, P. C. H. & de Vries, H. 2001. Elo-rating as a tool in the sequential estimation of dominance strengths. Animal Behaviour, 61, 489-495. (DOI: 10.1006/anbe.2000.1571)
Neumann, C., Duboscq, J., Dubuc, C., Ginting, A., Irwan, A. M., Agil, M., Widdig, A. & Engelhardt, A. 2011. Assessing dominance hierarchies: validation and advantages of progressive evaluation with Elo-rating. Animal Behaviour, 82, 911-921. (DOI: 10.1016/j.anbehav.2011.07.016)
data(adv)
SEQ <- EloRating:::.elo.seq_old(winner=adv$winner, loser=adv$loser, Date=adv$Date)
summary(SEQ)
Run the code above in your browser using DataLab