Description Usage Arguments Details Value Note References Examples
Given a players score, ranges of scores to associate with a K factor and the K values to use for the given ranges the function will find the appropriate K score to use for an elo rtaing update based on Neumann et al 2011.
1 | findK(playerScore, kScaleBounds, kFactors)
|
playerScore |
the score of the player in question |
kScaleBounds |
the player score bins to associate with K factors |
kFactors |
the possible K factors to be used |
Given a parameterization of kScaleBounds = c(-Inf, 2100, 2400, Inf) and kFactors = c(32,24,16):
- If an individuals score is less than 2100 the kFactor assigned is 32
- Between 2100 and 2400 the kFactor assigned is 24
- A score above 2400 the the kFactor assigned is 16
the players associated K factor
In order to ensure a proper function call the kScaleBounds parameter must be sorted from least to greatest and must be of a length 1 greater than the length of the kFactors parameter. In addition assigning the first element of kScaleBounds to -Inf and the last to Inf will allow the players score to always remain within an acceptable range.
Neumann et al (2011) Assessing Dominance Hierarchies. Animal Behaviour
1 2 3 4 5 6 | # generic function calls
findK (1000, kScaleBounds = c(-Inf, Inf), kFactors = 100)
findK (1000, kScaleBounds = c(-Inf, 1100, Inf), kFactors = c(32, 16))
# may cause errors in elo algorithim if range of kscale bounds isnt all real
# numbers but you can still call it this way
findK (1000, kScaleBounds = c(0, 500, 100, Inf), kFactors = c(32, 16, 8))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.