weighted.fractile: Weighted Median

weighted.fractileR 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)

isotone documentation built on March 7, 2023, 6:58 p.m.