integrate_generalized_lorenz_curve: Integrate generalized Lorenz curve

View source: R/rif.R

integrate_generalized_lorenz_curveR Documentation

Integrate generalized Lorenz curve

Description

Computes the area under the lorenz curve.

Usage

integrate_generalized_lorenz_curve(dep_var, weights)

Arguments

dep_var

dependent variable of a distributional function. Discrete or continuous numeric vector.

weights

numeric vector of non-negative observation weights, hence of same length as dep_var. The default (NULL) is equivalent to weights = rep(1, length(dep_var)).

Value

the size of the area under the lorenz curve (the integrated lorenz curve).

Examples


dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9)
weights <- c(2, 1, 3, 4, 4, 1, 6, 3)
integrated_lorenz_curve <-
  integrate_generalized_lorenz_curve(
    dep_var = dep_var,
    weights = weights
  )


rifreg documentation built on June 21, 2025, 5:08 p.m.