gunif {giniVarCI} | R Documentation |
Gini index for the Uniform distribution with user-defined lower and upper limits
Description
Calculates the Gini index for the Uniform distribution with lower limit min
and upper limit max
.
Usage
gunif(
min = 0,
max = 1
)
Arguments
min |
A non-negative real number specifying the lower limit of the Uniform distribution. The default value is |
max |
A positive real number higher than |
Details
The Uniform distribution with lower and upper limits and
, and denoted as
, where
,
,
and both must be finite, has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995; Yee, 2022)
where . The cumulative distribution function is given by
The Gini index can be computed as
If min
or max
are not specified they assume the default values of 0 and 1, respectively.
Value
A numeric value with the Gini index. A NA
value is returned when a limit is non-numeric or non-negative, or .
Author(s)
Juan F Munoz jfmunoz@ugr.es
Jose M Pavia pavia@uv.es
Encarnacion Alvarez encarniav@ugr.es
References
Kleiber, C. and Kotz, S. (2003). Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.
Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 1, chapter 14. Wiley, New York.
Yee, T. W. (2022). VGAM: Vector Generalized Linear and Additive Models. R package version 1.1-7, https://CRAN.R-project.org/package=VGAM.
See Also
Examples
# Gini index for the Uniform distribution with lower limit 0 and upper limit 1.
gunif()
# Gini index for the Uniform distribution with lower limit 10 and upper limit 190.
gunif(min = 10, max = 190)