hdqe | R Documentation |
Computes the Harrell-Davis quantile estimator for given quantile levels.
hdqe(x, Q = c(0.25, 0.5, 0.75))
x |
Numeric vector of data values. |
Q |
A numeric vector of quantile levels to estimate, between 0 and 1. Defaults to |
The function computes the Harrell-Davis quantile estimator, which estimates data quantiles by calculating a weighted average of order statistics. The weights are based on the beta distribution.
A numeric vector containing estimated quantiles.
Zeynel Cebeci, A. Firat Ozdemir, Engin Yildiztepe
set.seed(1)
x <- sample(1:10, 50, replace=TRUE)
quantile(x, probs=c(0.25, 0.5, 0.75), type=1) # quantiles with Type 1 in stats::quantile
quantile(x, probs=c(0.25, 0.5, 0.75), type=7) # quantiles with Type 7 (default) in stats::quantile
hdqe(x, Q=c(0.25, 0.5, 0.75)) # quantiles with Harrell-Davis Estimator
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.