optistart: optimize start values

Description Usage Arguments Details Value Author(s) Examples

View source: R/optistart.R

Description

experimental function to test different sets of randomly selected start values

Usage

1
2
3
4
5
6
7
8
optistart(
  eloobject,
  burnin = 0,
  spread = 200,
  runs = 2000,
  doplot = FALSE,
  initialcohort = TRUE
)

Arguments

eloobject

output from elo.seq

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 burnin = 0, i.e. all interactions are considered.

spread

numeric, the standard deviation of the ratings to be tested (by default 200)

runs

numeric, number of inital ratings to be tested (by default 2000)

doplot

logical, should the distribution of log likelihoods be plotted

initialcohort

logical, not yet implemented

Details

if the plot is produced, the red line indicates the log-likelihood when all individuals are assigned the same starting value

the item $best reflects the optimal start values found

Value

a list with multiple items:

Author(s)

Christof Neumann

Examples

1
2
3
4
5
6
7
set.seed(123)
xdata <- randomsequence(8, 100)$seqdat
res1 <- elo.seq(xdata$winner, xdata$loser, xdata$Date)
ores <- optistart(res1)
res2 <- elo.seq(xdata$winner, xdata$loser, xdata$Date, startvalue = ores$best)
eloplot(res1)
eloplot(res2)

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