The cdf
function returns 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.
cdf(object)# S4 method for normalDist
cdf(object)
# S4 method for logNormalDist
cdf(object)
# S4 method for gammaDist
cdf(object)
# S4 method for studentDist
cdf(object)
# S4 method for logisticDist
cdf(object)
# S4 method for compoundEvtRefDist
cdf(object)
# S4 method for compoundNoEvtRefDist
cdf(object)
# S4 method for compoundEvtInnovDist
cdf(object)
# S4 method for compoundNoEvtInnovDist
cdf(object)
Any S4 object for which a cdf
method is defined. Should match with the definition of an S4 distribution object as defined in the optimalThreshold
package.
Returns 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 cdf
method applied to a normalDist
object is simply the pnorm
function (see help on this function to have more details).
Log-normal distribution: the cdf
method applied to a logNormalDist
object is simply the plnorm
function (see help on this function to have more details).
Gamma distribution: the cdf
method applied to a gammaDist
object is simply the pgamma
function (see help on this function to have more details).
Scaled t distribution: the scaled t distribution with df
= n, mu
= \(\mu\), and sd
= \(\sigma\) has density:
$$f(x)=(\Gamma((n+1)/2)/(\sqrt{n\pi}\Gamma(n/2))(1+((x-\mu)/\sigma)^2/n)^-((n+1)/2))/\sigma$$
Logistic distribution: the cdf
method applied to a logisticDist
object is simply the plogis
function (see help on this function to have more details).
User-defined distribution: the cdf
method applied to a userDefinedDist
object is simply the cumulative distribution 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 cdf
function applied to these objects is defined dynamically depending on what types of distribution are fitted. The definition of the cdf
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.
trtSelThresh
, diagThresh
, pnorm
, plnorm
, pgamma
, plogis
, fit
.