wtd.iqr: Weighted Interquartile range

View source: R/wtd.quantile.R

wtd.iqrR Documentation

Weighted Interquartile range

Description

Compute weighted Interquartile range (iqr)

Usage

wtd.iqr (x, na.rm = FALSE, weight=NULL)

Arguments

x

Vector of data, same length as weight

na.rm

Logical: Should NAs be stripped before computation proceeds?

weight

Vector of weights. If NULL, the default, weights are not used.

Details

Uses a simple algorithm based on sorting.

Value

Returns an empirical interquartile range from a weighted sample.


reldist documentation built on March 7, 2023, 8:34 p.m.