Function to optimize k parameter and entry Elo scores
elo.model3(par, IA_data, all_ids, return_likelihood = T)
list of parameters, with par[1] being log(k), and par[2:length(par)] being the initial elo scores of individuals
list of interaction data, with columns "Date", "Winner", and "Loser" (in that order)
list of all ids to rank
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.
# for internal use