loglogistic2_gradient_2: 2-parameter log-logistic function gradient and Hessian

View source: R/loglogistic2.R

loglogistic2_gradient_2R Documentation

2-parameter log-logistic function gradient and Hessian

Description

Evaluate at a particular set of parameters the gradient and Hessian of the 2-parameter log-logistic function.

Usage

loglogistic2_gradient_2(x, theta, delta)

loglogistic2_hessian_2(x, theta, delta)

loglogistic2_gradient_hessian_2(x, theta, delta)

Arguments

x

numeric vector at which the function is to be evaluated.

theta

numeric vector with the two parameters in the form c(eta, phi).

delta

value of delta parameter (either 1 or -1).

Details

The 2-parameter log-logistic function ⁠f(x; theta)⁠ is defined here as

⁠g(x; theta) = x^eta / (x^eta + phi^eta)⁠ ⁠f(x; theta) = alpha + delta g(x; theta)⁠

where x >= 0, theta = c(alpha, delta, eta, phi), eta > 0, and phi > 0. Only eta and phi are free to vary (therefore the name), while c(alpha, delta) are constrained to be either c(0, 1) (monotonically increasing curve) or c(1, -1) (monotonically decreasing curve).

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

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

Value

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


drda documentation built on April 3, 2025, 6 p.m.