rank_wt: Ranks a numeric variable taking weights into account. Mimics...

View source: R/rpart-ci.R

rank_wtR Documentation

Ranks a numeric variable taking weights into account. Mimics a Stata function

Description

This function calculates the weighted fractional ranks of a numeric variable.

Usage

rank_wt(x, wt)

Arguments

x

numeric vector

wt

weights

Value

a numeric vector containing weighted fractional ranks of the elements of x.

Author(s)

Peter Konings

References

Kakwani et al., 1997.

Examples

x <- sample(1:10, size = 10, replace = TRUE)
x.weight <- seq(0, 1, length.out = 10)
rank_wt(x, wt = x.weight)

brechtdv/rineq documentation built on Feb. 21, 2024, 2:18 p.m.