Function to optimize k parameter and entry Elo scores

elo.model3(par, IA_data, all_ids, return_likelihood = T)

Arguments

par

list of parameters, with par[1] being log(k), and par[2:length(par)] being the initial elo scores of individuals

IA_data

list of interaction data, with columns "Date", "Winner", and "Loser" (in that order)

all_ids

list of all ids to rank

return_likelihood

If TRUE, returns the total likelihood based on all interactions given a particular set of parameters. If FALSE, returns a table of Elo scores based on a given set of parameters.

Examples

# for internal use