hessb {QRMlib}R Documentation

Approximate Hessian Matrix

Description

calculates a numerical approximation of Hessian matrix

Usage

hessb(f, x, ep=0.0001, ...)

Arguments

f function
x value of function at which to approximate Hessian
ep precision for numerical differencing
... other arguments of function f

Value

matrix of approximate second derivatives

Examples

## Not run: 
#within fit.NH we approximate 2nd derivatives to calc standard errors
if(se) 
{
  hessmatrix <- hessb(negloglik,par.ests)
  vcmatrix <- solve(hessmatrix)
  par.ses <- sqrt(diag(vcmatrix))
  names(par.ses) <- names(par.ests)
  dimnames(vcmatrix) <- list(names(par.ests), names(par.ests))
}
else 
{
  par.ses <- NA
  vcmatrix <- NA
}
## End(Not run)

[Package QRMlib version 1.4.4 Index]