createstartvalues {EloRating} | R Documentation |
calculate start values from prior knowledge
Description
calculate start values from prior knowledge
Usage
createstartvalues(
ranks = NULL,
rankclasses = NULL,
shape = 0.3,
startvalue = 1000,
k = 100
)
Arguments
ranks |
named vector, contains the ordinal ranks of all individuals for which such prior knowledge exists, names of the vector refer to the individual codes as they occur in the interaction sequence supplied to |
rankclasses |
list with four items, each representing a rank class in descending order, if a given rank class is empty supply it as |
shape |
numeric, between 0 and 1, by default |
startvalue |
numeric, the rating value with which an individual starts into the rating process. By default |
k |
numeric, the k factor that determines the maximum change in ratings. By default |
Details
only one of ranks
or rankclasses
can be supplied.
if you wish to supply rank classes you need to supply four categories and it is assumed that the first list item is the highest class. If you have less than four rank classes, you still need to supply a list with four items and set those that you wish to ignore to NULL
, see examples.
Value
list with three items:
res |
a named numeric vector with the startvalues to be supplied to |
k |
k factor used |
startvalue |
start value used |
Author(s)
Christof Neumann
References
Newton-Fisher NE (2017). “Modeling social dominance: Elo-ratings, prior history, and the intensity of aggression.” International Journal of Primatology, 38, 427-447. doi:10.1007/s10764-017-9952-2.
Examples
# assuming a group with 7 individuals
# with four rank classes
myrankclasses <- list(alpha = "a", high=c("b", "c"), mid=c("d", "e"), low=c("f", "g"))
createstartvalues(rankclasses = myrankclasses)
# with two rank classes
myrankclasses2 <- list(class1 = NULL, high=c("a", "b", "c"), class3=NULL, low=c("d", "e", "f", "g"))
createstartvalues(rankclasses = myrankclasses2)
# with ordinal ranks
myranks <- 1:7; names(myranks) <- letters[1:7]
createstartvalues(ranks = myranks)