either maximize or minimize the log-likelihood function. If estimation is successful, the function calculates a high-precision numerical hessian and a standard and robust variance-covariance matrix.
estimate(ll, estim_env, model_options, control = NULL)
This is the 'raw' log-likelihood function passed to the estimation routine. It is important that the user takes into account whether the optimization routine is a minimizer (e.g. 'ucminf') or a maximizer (e.g. 'maxlik').
An estimation environment or list of estimation environments
returned from prepare
A list of model options. Note, this list is validated
for a second time here to set some necessary defaults. See
validate
for details.
A list of control options that are passed to
set_controls
.
A 'cmdlr' model object
NOTE: There are no checks on whether the log-likelihood function is correctly specified. If you see that your log-likelihood value is getting progressively worse from starting values, check your 'll' specification and that it corresponds to the chosen optimizer.
if (FALSE) {
# See /examples for how to use
estimate(ll, estim_env, model_options)
# or
estimate(ll, estim_env, model_options, control)
}