weighted.fractile {isotone}R Documentation

Weighted Median

Description

Computes the weighted fractile of a numeric vector

Usage

weighted.fractile(y, w, p)

Arguments

y A numeric vector containing the values whose fractile is to be computed
w A vector of length y giving the weights to use for each element of y
p Fractile specification; value between 0 and 1

See Also

weighted.mean, weighted.median

Examples

y <- 1:9
w <- c(rep(1,5), rep(2,4))
res <- weighted.fractile(y, w, p = 0.33)

[Package isotone version 1.0-0 Index]