Quantile: Sample quantile for weighted data

View source: R/inequalityMeasure.R

QuantileR Documentation

Sample quantile for weighted data

Description

Computes quantile derived for the given probability taking into account weights.

Usage

Quantile(X, W = rep(1, length(X)), p = 0.5)

Arguments

X

is a numeric data vector

W

is a vector of weights

p

is a probability to derive corresponding quantile

Details

Linear interpolation is applied to deal with a frequency distribution.

Value

The quantile for weighted data.

Examples

# Compare weighted and unweighted result
X=1:10
W=10:1
Quantile(X,p=0.5)
Quantile(X,W,p=0.5)


wINEQ documentation built on April 23, 2026, 5:07 p.m.

Related to Quantile in wINEQ...