powered by
Inverse cumulative distribution function
cdf2quantile(p, cdf, interval = c(-3, 3), ...)
Numeric vector of p evaluated in the inverse cdf.
p
numeric vector of probabilities.
function, cumulative distribution function which to invert.
numeric vector of length 2, determining the lower and upper bound of the uniroot interval
other arguments for the cdf, e.g. mu, sigma_v, sigma_u, s...
Code is a clone from the package gbutils.
q=5 cdf <- pnorm(q=q, mean=1, sd=2) q_numeric <- cdf2quantile(p=cdf, cdf=pnorm, mean=1, sd=2) all.equal(q,q_numeric)
Run the code above in your browser using DataLab