optistart: optimize start values

View source: R/optistart.R

optistartR Documentation

optimize start values

Description

experimental function to test different sets of randomly selected start values

Usage

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

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)

gobbios/EloRating documentation built on July 19, 2024, 4:05 a.m.