Exact Hessian of the negative log-likelihood function of a TVGEV object.

d2negLogLikFun(psi, object)

Arguments

psi

Value of the parameter vetor.

object

A TVGEV object.

Value

The Hessian matrix of the negative log-likelihood. When psi is taken as the estimate of the model given in object, the matrix should be positive semidefinite.

Details

The Hessian matrix computation relies on the exact second order derivatives of the GEV density w.r.t the vector \(\boldsymbol{\theta}\) of GEV parameters, see dGEV. The derivatives w.r.t. the vector of model parameters \(\boldsymbol{\psi}\) are computed by chain rule using the linear inverse link.

Note

For now, only a fairly limited use is made of the Hessian, hence we do not strive to optimise the computation. Note that the Hessian used in the TVGEV estimation function (creator of TVGEV objects) and providing the covariance matrix vcov by inversion is a numeric one for now.

News

From version 0.1.8, the negLogLikFun function (closure) shipped with a TVGEV optionally comptes the Hessian.

Examples

if (FALSE) {
   example(TVGEV)
   H1 <- d2negLogLikFun(res1$estimate, object = res1)
   H1 - res1$hessian
   H2 <- d2negLogLikFun(res2$estimate, object = res2)
   H2 - res2$hessian
}