Description Usage Arguments Details Value References Examples
(log) likelihood of Elo-rating model
1 |
eloobject |
output from |
burnin |
numeric, the number of interactions to be excluded from the calculation of the (log) likelihood. This parameter is ignored if a date range is supplied. By default |
ll |
logical, should the log likelihood be returned rather than the likelihood, by default |
daterange |
character or Date of length 2, gives the date range for which likelihood should be calculated. By default, the entire date range of all interactions is considered. |
This function returns the (log) likelihood of a dominance interaction sequence. The likelihood is the product of all winning probabilities (for each interaction).
numeric of length 1, the (log) likelihood
franz2015aEloRating
\insertRefmcmahan1984EloRating
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(adv)
res <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date, k = 200)
likelo(res)
res <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date, k = 100)
likelo(res)
ks <- seq(100, 400, by = 20)
liks <- numeric(length(ks))
for(i in 1:length(liks)) {
liks[i] <- likelo(elo.seq(winner = adv$winner, loser = adv$loser,
Date = adv$Date, k = ks[i]))
}
plot(ks, liks, type = "l")
# discard early interactions via 'burnin'
likelo(res)
# the same as above:
likelo(res, burnin = 0)
# discard the first 10 interactions:
likelo(res, burnin = 10)
# discard all but the last interaction:
likelo(res, burnin = 32)
# which is the same as the log of the last winning probability:
log(winprob(res$logtable$Apre[33], res$logtable$Bpre[33]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.