Evaluate the negative log-likelihood of a NSGEV model.
negLogLik(psi, model, data = NULL, y = NULL, deriv = TRUE, checkNames = TRUE)
Vector of NSGEV parameters.
The NSGEV model.
A data frame with the covariates to be used. By
default, the data attached to model
is udes.
The response as in NSGEV
. By default the response
attached to the model is used.
Logical. When TRUE
, the gradient
\(-\partial \ell/\partial \boldsymbol{\psi}\)
of the negative log-likelihood w.r.t. the parameters of the model
will be returned. In this case, a list will be returned.
Logical. If TRUE
, the names of the vector
psi
are checked against the parnames of the model.
The negative log-likelihood (to be minimized) or a list with two elements corresponding to the value of the log-likelihood and its gradient.
The returned value of this function when deriv
is TRUE
is designed for use with the nloptr
package.
The class of the result may be changed in future versions.