Learn R Programming

giniVarCI (version 0.0.1-3)

gweibull: Gini index for the Weibull distribution with user-defined shape parameters

Description

Calculate the Gini indices for the Weibull distribution with shape parameters \(a\).

Usage

gweibull(shape)

Value

A numeric vector with the Gini indices. A NA is returned when a shape parameter is non-numeric or non-positive.

Arguments

shape

A vector of positive real numbers specifying shape parameters \(a\) of the Weibull distribution.

Author

Juan F Munoz jfmunoz@ugr.es

Jose M Pavia pavia@uv.es

Encarnacion Alvarez encarniav@ugr.es

Details

The Weibull distribution with scale parameter \(\sigma\), shape parameter \(a\), and denoted as \(Weibull(\sigma, a)\), where \(\sigma>0\) and \(a>0\), has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995; Yee, 2022) $$f(y) = \displaystyle \frac{a}{\sigma}\left(\frac{y}{\sigma}\right)^{a-1}e^{-(y/\sigma)^{a}},$$ and a cumulative distribution function given by $$F(y) = \displaystyle 1 - e^{-(y/\sigma)^{a}},$$ where \(y \geq 0\).

The Gini index can be computed as $$G = 1-2^{-1/a}.$$

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.

See Also

gbeta, ggamma, gchisq, gunif

Examples

Run this code
# Gini index for the Weibull distribution with 'shape = 1'.
gweibull(shape = 1)

# Gini indices for the Weibull distribution and different shape parameters.
gweibull(shape = 1:10)

Run the code above in your browser using DataLab