.elo.seq_old | R Documentation |
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
)
winner |
either a factor or character vector with winner IDs of dyadic dominance interactions |
loser |
either a factor or character vector with loser IDs of dyadic dominance interactions |
Date |
character vector of form "YYYY-MM-DD" with the date of the respective interaction |
draw |
logical, which interactions ended undecided (i.e. drawn or tied)? By default all |
presence |
optional data.frame, to supply data about presence and absence of individuals for part of the time the data collection covered. see details |
startvalue |
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 |
k |
factor k that determines the maximum change in ratings. By default |
normprob |
logical (by default |
init |
character, what Elo rating does an individual have prior to its first interaction. Three options are available:
|
iterate |
not yet implemented |
runcheck |
logical, should several checks regarding data integrety be performed, by default |
progressbar |
logical, should progress bars be displayed, by default |
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.
An object of class elo
, which is list with 10 items that serves as basis to extract relevant information:
mat |
a date by ID- |
lmat |
a date by ID- |
cmat |
a date by ID- |
pmat |
a date by ID- |
nmat |
a date by ID- |
logtable |
details on each single interaction |
stability |
a |
truedates |
vector of class |
misc |
various |
allids |
a (sorted) character vector with all IDs that occur in the dataset |
Christof Neumann and Lars Kulik
elo1978EloRating
\insertRefalbers2001EloRating
\insertRefneumann2011EloRating
data(adv)
SEQ <- EloRating:::.elo.seq_old(winner=adv$winner, loser=adv$loser, Date=adv$Date)
summary(SEQ)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.