Learn R Programming

drda (version 2.0.5)

gompertz_gradient_2: Gompertz function gradient and Hessian

Description

Evaluate at a particular set of parameters the gradient and Hessian of the Gompertz function.

Usage

gompertz_gradient_2(x, theta)

gompertz_hessian_2(x, theta)

gompertz_gradient_hessian_2(x, theta)

Value

Gradient or Hessian of the alternative parameterization evaluated at the specified point.

Arguments

x

numeric vector at which the function is to be evaluated.

theta

numeric vector with the four parameters in the form c(alpha, delta, eta, phi).

Details

The Gompertz function f(x; theta) is defined here as

g(x; theta) = exp(-exp(-eta * (x - phi))) f(x; theta) = alpha + delta g(x; theta)

where theta = c(alpha, delta, eta, phi) and eta > 0. When delta is positive (negative) the curve is monotonically increasing (decreasing).

This set of functions use a different parameterization from link[drda]{gompertz_gradient}. To avoid the non-negative constraints of parameters, the gradient and Hessian computed here are for the function with eta2 = log(eta).

Note that argument theta is on the original scale and not on the log scale.