cdf2quantile {dsfa} | R Documentation |
Inverse cumulative distribution function
cdf2quantile(p, cdf, interval = c(-3, 3), ...)
p |
numeric vector of probabilities. |
cdf |
function, cumulative distribution function which to invert. |
interval |
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'.
Numeric vector of p
evaluated in the inverse cdf.
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)