diff --git a/R/DAISIE_ML1.R b/R/DAISIE_ML1.R index 2fb1edb9..3bc01e1c 100644 --- a/R/DAISIE_ML1.R +++ b/R/DAISIE_ML1.R @@ -107,7 +107,8 @@ DAISIE_ML1 <- function( tolint = c(1E-16, 1E-10), island_ontogeny = NA, jitter = 0, - num_cycles = 1) { + num_cycles = 1, + function_to_optimize = DAISIE_loglik_all_choosepar) { # datalist = list of all data: branching times, status of clade, and numnber of missing species # datalist[[,]][1] = list of branching times (positive, from present to past) # - max(brts) = age of the island @@ -288,7 +289,7 @@ DAISIE_ML1 <- function( ) optimpars <- c(tol, maxiter) - initloglik <- DAISIE_loglik_all_choosepar( + initloglik <- function_to_optimize( trparsopt = trparsopt, trparsfix = trparsfix, idparsopt = idparsopt,