plot.rating: Plot Player Features Across Time for a Rating Object

Description Usage Arguments Details See Also Examples

Description

Plot line traces of estimated ratings or other features for selected players. This function can only be used if the full history is retained in the object x.

Usage

1
2
3
4
## S3 method for class 'rating'
plot(x, which = "Rating", players = NULL, t0 = 1, tv = NULL,
  npl = 10, random = FALSE, xlab = "Time Period", ylab = paste(x$type," Ratings"), 
  main = paste(x$type," Ratings System"), inflation = FALSE, add=FALSE, ...) 

Arguments

x

An object of class "rating".

which

The variable to be plotted.

players

If not NULL, should be a vector of player identifiers to explicitly select players to be plotted.

t0

The time index at which to begin. Note that unless players are specified explicitly, players who do not play at time index t0 will not be selected for the plot. Can also be a vector of length two, in which case the second value is the time index at which to end.

tv

If not NULL, then a vector of values to be used on the x-axis instead of the time index.

npl

The number of players to select.

random

If TRUE, npl players are selected at random from those who played at time t0. If FALSE (the default), the npl players who played most games at t0 are selected. Ignored if players is not NULL.

xlab,ylab,main

Graphical parameters.

inflation

If TRUE, plot the average rating of the best npl players at each time point. This is designed to investigate ratings inflation.

add

Add to an existing plot.

...

Other parameters to be passed through to plotting functions.

Details

Note that the argument random is not used by default, since it can produce flat profiles from randomly selected players who play few games. The default selection is non-random and selects more active players, however they may be more likely to improve over time than the general population.

See Also

hist.rating

Examples

1
2
3
4
5
6
7
afl <- aflodds[,c(2,3,4,7)]
robj <- steph(afl, history=TRUE)
plot(robj)

robj <- elom(riichi, history = TRUE)
pl <- robj$ratings$Player[robj$ratings$Games >= 80]
plot(robj, players = pl)

Example output



PlayerRatings documentation built on March 1, 2020, 5:07 p.m.