powered by
Computes quantile derived for the given probability taking into account weights.
Quantile(X, W = rep(1, length(X)), p = 0.5)
The quantile for weighted data.
is a numeric data vector
is a vector of weights
is a probability to derive corresponding quantile
Linear interpolation is applied to deal with a frequency distribution.
# Compare weighted and unweighted result X=1:10 W=10:1 Quantile(X,p=0.5) Quantile(X,W,p=0.5)
Run the code above in your browser using DataLab