Lorenz.curve {LorenzRegression}R Documentation

Concentration curve of y with respect to x

Description

Lorenz.curve computes the concentration curve index of a vector y with respect to another vector x. If y and x are identical, the obtained concentration curve boils down to the Lorenz curve.

Usage

Lorenz.curve(
  y,
  x = y,
  graph = FALSE,
  na.rm = TRUE,
  ties.method = c("mean", "random"),
  seed = NULL,
  weights = NULL
)

Arguments

y

variable of interest.

x

variable to use for the ranking. By default x=y, and the obtained concentration curve is the Lorenz curve of y.

graph

whether a graph of the obtained concentration curve should be traced. Default value is FALSE.

na.rm

should missing values be deleted. Default value is TRUE. If FALSE is selected, missing values generate an error message

ties.method

What method should be used to break the ties in the rank index. Possible values are "mean" (default value) or "random". If "random" is selected, the ties are broken by further ranking in terms of a uniformly distributed random variable. If "mean" is selected, the average rank method is used.

seed

seed imposed for the generation of the vector of uniform random variables used to break the ties. Default is NULL, in which case no seed is imposed.

weights

vector of sample weights. By default, each observation is given the same weight.

Value

A function corresponding to the estimated Lorenz or concentration curve. If graph is TRUE, the curve is also plotted.

See Also

Lorenz.graphs, Gini.coef

Examples

data(Data.Incomes)
# We first compute the Lorenz curve of Income
Y <- Data.Incomes$Income
Lorenz.curve(y = Y, graph = TRUE)
# Then we compute the concentration curve of Income with respect to Age
X <- Data.Incomes$Age
Lorenz.curve(y = Y, x = X, graph = TRUE)


[Package LorenzRegression version 1.0.0 Index]