% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Lorenz_plot.R
\name{Heterogeneity}
\alias{Heterogeneity}
\alias{Lorenz_plot}
\alias{Gini}
\title{Lorenz Curve and the Gini Coefficient}
\usage{
Lorenz_plot(x, add = FALSE, ...)

Gini(x)
}
\arguments{
\item{x}{A numeric vector.}

\item{add}{A logical value.
\itemize{
\item \code{TRUE}: add the Lorenz curve to an already existing plot.
\item \code{FALSE} (the default): draw the Lorenz curve to a new graphic device.
}}

\item{...}{Further graphical parameters supplied to the internal
\code{\link[base:plot]{base::plot()}} (when \code{add = FALSE}) or \code{\link[graphics:lines]{graphics::lines()}} (when
\code{add = TRUE}) function. See \code{\link[graphics:par]{graphics::par()}} document.}
}
\value{
\code{Lorenz_plot()} draws a Lorenz curve (the group heterogeneity plot) and returns an
invisible copy of a Gini coefficient (the group heterogeneity index).

\code{Gini()} returns a Gini coefficient.
}
\description{
Draws a Lorenz curve (the group heterogeneity plot) and computes the Gini
coefficient (the group heterogeneity index).
}
\examples{
vertex_weight <- igraph::V(MCUmovie)$worldwidegross
cent <- L1cent(MCUmovie, vertex_weight = vertex_weight)
gini <- Lorenz_plot(cent, asp = 1) # one can use "plot(cent, asp = 1)"
graphics::abline(0, 1, lty = 2)
# group heterogeneity index
gini
gini == Gini(cent)
}
\references{
S. Kang and H.-S. Oh. On a notion of graph centrality based on
\ifelse{html}{\out{<i>L</i><sub>1</sub>}}{{\eqn{L_1}}} data depth.
\emph{Journal of the American Statistical Association}, 121(553): 400--412, 2026.

M. O. Lorenz. Methods of measuring the concentration of wealth.
\emph{Publications of the American Statistical Association}, 9(70): 209--219, 1905.
}
\seealso{
\code{plot()} methods for objects of class \link{L1cent} and \link{L1centLOC}
support plotting a Lorenz curve. \code{summary()} methods for objects of
class \link{L1cent}, \link{L1centLOC}, and \link{L1centNB} provide the Gini coefficient as
one of the summary statistics.
}
