modelGradient: Model log-likelihood/objective error function and its gradient.
Description
modeGradient
gives the gradient of the objective function for a
model. By default the objective function (modelObjective
) is
a negative log likelihood (modelLogLikelihood
).Usage
modelObjective(params, model, ...)
modelLogLikelihood(model)
modelGradient(params, model, ...)
Arguments
params
parameter vector to evaluate at.
...
optional additional arguments.
Value
- gthe gradient of the error function to be minimised.
- vthe objective function value (lower is better).
- llthe log-likelihood value.