R/ddm_fit.R

Defines functions fit_nlminb

fit_nlminb <- function(init,
                       objective, gradient,
                       lower, upper,
                       control,
                       ...) ## ... arguments are ignored
{
  out <- nlminb(start = init,
                objective = objective,
                gradient = gradient,
                lower = lower, upper = upper,
                control = control)
  list(
    coefficients = out$par,
    loglik = -out$objective,
    converged = out$convergence == 0,
    optim = out
  )
}

Try the fddm package in your browser

Any scripts or data that you put into this service are public.

fddm documentation built on June 26, 2024, 5:10 p.m.