The function is a wrapper around several methods for obtaining the optimum using either maximization (maxLik) or minimization (ucminf). The function is meant for internal use and is not exported.

estimate_model(
  type,
  log_lik,
  param_start,
  param_free,
  param_fixed,
  workers,
  ll,
  control
)

Arguments

type

A character string giving the R pacakge to use for optimization. One of: "maxlik" or "ucminf"

log_lik

A log-likelihood expression prepared by prepare_log_lik

param_start

The complete list of parameters at their starting values (including fixed parameters)

param_free

A list of freely estimated parameters

param_fixed

A list of parameters that are held fixed at their starting values

workers

A list of workers for parallel computing

ll

The 'raw' log likelihood function passed by the user

control

A list of estimation controls passed to the optimizer

Value

A custom model object