Essentially, this is a more strict wrapper of as_q(f)(probs). If any value in probs is outside of segment \[0; 1\], an error is thrown.

summ_quantile(f, probs)

Arguments

f

A pdqr-function representing distribution.

probs

Vector of probabilities for which quantiles should be returned.

Value

A numeric vector of the same length as probs representing corresponding quantiles.

See also

Examples

d_norm <- as_d(dnorm) probs <- c(0.25, 0.5, 0.75) all.equal(summ_quantile(d_norm, probs), as_q(d_norm)(probs))
#> [1] TRUE