Computes weighted sum of values not greater then a quantile derived for the given probability.
Usage
LowerSum(X, W = rep(1, length(X)), p = 0.5)
Value
The weighted sum of values not greater then a quantile.
Arguments
X
is a numeric data vector
W
is a vector of weights
p
is a probability to derive corresponding quantile
Details
Calculates weighted sum of values not greater then a quantile derived for the given probability based on cumulative distribution. Linear interpolation is applied to deal with a frequency distribution.