powered by
empirical_dist
Uses the empirical quantile function from the observed data.
# S3 method for empirical_dist inv_cdf(x, ...)
A function that accepts a vector of probabilities p and returns the corresponding quantiles.
p
The empirical distribution object.
Additional arguments (not used).
ed <- empirical_dist(c(1, 2, 3, 4, 5)) qf <- inv_cdf(ed) qf(0.5) # median qf(c(0.25, 0.75)) # quartiles
Run the code above in your browser using DataLab