logit.hessian {Bhat}R Documentation

Hessian (curvature matrix)

Description

Numerical evaluation of the Hessian of a real function f: R^n \rightarrow R on a generalized logit scale, i.e. using transformed parameters according to x'=log((x-xl)/(xu-x))), with xl < x < xu.

Usage

logit.hessian(
  x = x,
  f = f,
  del = rep(0.002, length(x$est)),
  dapprox = FALSE,
  nfcn = 0
)

Arguments

x

a list with components 'label' (of mode character), 'est' (the parameter vector with the initial guess), 'low' (vector with lower bounds), and 'upp' (vector with upper bounds)

f

the function for which the Hessian is to be computed at point x

del

step size on logit scale (numeric)

dapprox

logical variable. If TRUE the off-diagonal elements are set to zero. If FALSE (default) the full Hessian is computed

nfcn

number of function calls

Details

This version uses a symmetric grid for the numerical evaluation computation of first and second derivatives.

Value

returns list with

df

first derivatives (logit scale)

ddf

Hessian (logit scale)

nfcn

number of function calls

eigen

eigen values (logit scale)

Note

This function is part of the Bhat exploration tool

Author(s)

E. Georg Luebeck (FHCRC)

See Also

dfp, newton, ftrf, btrf, dqstep

Examples


  ## Rosenbrock Banana function
   fr <- function(x) {
         x1 <- x[1]
         x2 <- x[2]
         100 * (x2 - x1 * x1)^2 + (1 - x1)^2
    }
  ## define
   x <- list(label=c("a","b"),est=c(1,1),low=c(-100,-100),upp=c(100,100))
   logit.hessian(x,f=fr,del=dqstep(x,f=fr,sens=0.01))
  ## shows the differences in curvature at the minimum of the Banana
  ## function along principal axis (in a logit-transformed coordinate system)


[Package Bhat version 0.9-12 Index]