createstartvalues: calculate start values from prior knowledge

Description Usage Arguments Details Value Author(s) References Examples

View source: R/createstartvalues.R

Description

calculate start values from prior knowledge

Usage

1
2
3
4
5
6
7
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 elo.seq

rankclasses

list with four items, each representing a rank class in descending order, if a given rank class is empty supply it as NULL, see details and examples

shape

numeric, between 0 and 1, by default shape=0.3. This value determines the 'steepness' of the initial values. Steepest is at shape=0 and shallowest is at shape=1. See examples.

startvalue

numeric, the rating value with which an individual starts into the rating process. By default startvalue=1000

k

numeric, the k factor that determines the maximum change in ratings. By default k=100

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 elo.seq

k

k factor used

startvalue

start value used

Author(s)

Christof Neumann

References

\insertRef

newton-fisher2017aEloRating

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

EloRating documentation built on March 26, 2020, 7:29 p.m.