gradient {optimalThreshold} | R Documentation |
Probability density function of a specified distribution
Description
The gradient
function returns the probability density 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.
Usage
gradient(object)
## S4 method for signature 'normalDist'
gradient(object)
## S4 method for signature 'logNormalDist'
gradient(object)
## S4 method for signature 'gammaDist'
gradient(object)
## S4 method for signature 'studentDist'
gradient(object)
## S4 method for signature 'logisticDist'
gradient(object)
## S4 method for signature 'compoundEvtRefDist'
gradient(object)
## S4 method for signature 'compoundNoEvtRefDist'
gradient(object)
## S4 method for signature 'compoundEvtInnovDist'
gradient(object)
## S4 method for signature 'compoundNoEvtInnovDist'
gradient(object)
Arguments
object |
Any S4 object for which a |
Details
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
gradient
method applied to anormalDist
object is simply thednorm
function (see help on this function to have more details).Log-normal distribution: the
gradient
method applied to alogNormalDist
object is simply thedlnorm
function (see help on this function to have more details).Gamma distribution: the
gradient
method applied to agammaDist
object is simply thedgamma
function (see help on this function to have more details).Scaled t distribution: the scaled t distribution with
df
= n,mu
=, and
sd
=has density:
Logistic distribution: the
gradient
method applied to alogisticDist
object is simply thedlogis
function (see help on this function to have more details).User-defined distribution: the
gradient
method applied to auserDefinedDist
object is simply the gradient function provided by the user when fitting a user-defined distribution with thefit
function.
The S4 objects compoundEvtRefDist
, compoundNoEvtRefDist
, compoundEvtInnovDist
, and compoundNoEvtInnovDist
are created internally. The gradient
function applied to these objects is defined dynamically depending on what types of distribution are fitted. The definition of the gradient
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).
Value
Returns the probability density function of the specified distribution.
References
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.
See Also
trtSelThresh
, dnorm
, dlnorm
, dgamma
, dlogis
, fit