q_approxfun is a generic function that for a given object generates function to approximate the quantile function.
Usage
q_approxfun(O, range = q(O, c(0.005, 0.995)), n = 1000)
# S3 method for dist
q_approxfun(O, range = q(O, c(0.005, 0.995)), n = 1000)
Value
Function.
Arguments
O
distribution object.
range
interval on which the grid is defined, q(O, c(0.005, 0.995)).
n
number of points within the grid, default: 1000.
Details
Function q_approxfun generates a grid of values on which the CDF of the object is evaluated.
The function returns a quantile function that uses approx and the values
of the grid to approximate the quantiles. This function is designed mostly for the mixture distributions
where the standard q method may be slow and thus allows to trade the accuracy for the speed.
The returned function takes the arguments p, lower.tail and log.p, see q.