Generic function to find the quantiles of a distribution, given the equivalent probability distribution function.
Probability distribution function,
Vector of probabilities to find the quantiles for.
Vector of character strings naming arguments of the
distribution function that should not be vectorised over. Used, for
example, for the
The remaining arguments define parameters of the
This may also contain the standard arguments
If the distribution is bounded above or below, then this should contain
This function is intended to enable users to define
"q" functions for
new distributions, in cases where the distribution function
available analytically, but the quantile function is not.
It works by finding the root of the equation h(q) = pdist(q) - p = 0.
Starting from the interval (-1, 1), the interval width
is expanded by 50% until h() is of opposite sign at either end.
The root is then found using
This assumes a suitably smooth, continuous distribution.
An identical function is provided in the flexsurv package.
Vector of quantiles of the distribution at
Christopher Jackson <[email protected]>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.