logit.hessian | R Documentation |
Numerical evaluation of the Hessian of a real function f: R^n -> RR^n -> R on a generalized logit scale, i.e. using transformed parameters according to x'=log((x-xl)/(xu-x))), with xl < x < xu.
logit.hessian( x = x, f = f, del = rep(0.002, length(x$est)), dapprox = FALSE, nfcn = 0 )
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 |
This version uses a symmetric grid for the numerical evaluation computation of first and second derivatives.
returns list with
df |
first derivatives (logit scale) |
ddf |
Hessian (logit scale) |
nfcn |
number of function calls |
eigen |
eigen values (logit scale) |
This function is part of the Bhat exploration tool
E. Georg Luebeck (FHCRC)
dfp
, newton
, ftrf
,
btrf
, dqstep
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.