The hessian
function returns the second derivative of the cumulative distribution function relative to the S4 object passed in its argument. See details to know on what kind of S4 objects this function could be applied.
hessian(object)# S4 method for normalDist
hessian(object)
# S4 method for logNormalDist
hessian(object)
# S4 method for gammaDist
hessian(object)
# S4 method for studentDist
hessian(object)
# S4 method for logisticDist
hessian(object)
# S4 method for compoundEvtRefDist
hessian(object)
# S4 method for compoundNoEvtRefDist
hessian(object)
# S4 method for compoundEvtInnovDist
hessian(object)
# S4 method for compoundNoEvtInnovDist
hessian(object)
A distribution object.
Returns the second derivative of the cumulative distribution function of the specified distribution.
This method can be applied to the S4 distribution objects that are supported in the optimalThreshold
package: normalDist
, logNormalDist
, gammaDist
, studentDist
, logisticDist
, and userDefinedDist
. These methods are applied internally, and you have no need to use it outside of the main functions trtSelThresh
and diagThresh
.
Normal distribution: the hessian
method applied to a normalDist
object is simply the second derivative of the cumulative distribution function of a normal distribution, with mu
=\(\mu\) and sd
=\(\sigma\), and expressed as:
$$f'(x)=((\mu-x)/\sigma^2)*f(x)$$
Log-normal distribution: the hessian
method applied to a logNormalDist
object is simply the second derivative of the cumulative distribution function of a log-normal distribution, with mu
=\(\mu\) and sd
=\(\sigma\), and expressed as:
$$f'(x)=(((\mu-\log(x))/(x*\sigma^2))-1/x)*f(x)$$
Gamma distribution: the hessian
method applied to a gammaDist
object is simply the second derivative of the cumulative distribution function of a gamma distribution, with shape
=\(\alpha\) and scale
=\(\beta\), and expressed as:
$$f'(x)=((\alpha-1)/x-1/\beta)*f(x)$$
Scaled t distribution: the hessian
method applied to a studentDist
object is simply the second derivative of the cumulative distribution function of a t scaled distribution, with df
=n, mu
=\(\mu\) and sd
=\(\sigma\), and expressed as:
$$f'(x)=(-(n+1))*((x-\mu)/(\sigma^2*(n+((x-\mu)/\sigma)^2)))*f(x)$$
Logistic distribution: the hessian
method applied to a logisticDist
object is simply the second derivative of the cumulative distribution function of a logistic distribution, with location
=\(\mu\), and scale
=\(\sigma\), and expressed as:
$$f'(x)=((\exp(-(x-\mu)/\sigma)^2-1)/(\sigma*(1+\exp(-(x-\mu)/\sigma))^2))*f(x)$$
User-defined distribution: the hessin
method applied to a userDefinedDist
object is simply the hessian function provided by the user when fitting a user-defined distribution with the fit
function.
The S4 objects compoundEvtRefDist
, compoundNoEvtRefDist
, compoundEvtInnovDist
, and compoundNoEvtInnovDist
are created internally. The hessian
function applied to these objects is defined dynamically depending on what types of distribution are fitted. The definition of the hessian
function relies on the expression of the randomization constraint of a clinical trial that enforces the distribution of the marker in each treatment arm to be identical (see References for more details).
Blangero, Y, Rabilloud, M, Ecochard, R, and Subtil, F. A Bayesian method to estimate the optimal threshold of a marker used to select patients' treatment. Statistical Methods in Medical Research. 2019.