Learn R Programming

CUB (version 0.1)

gini: Normalized Gini heterogeneity index

Description

Compute the normalized Gini heterogeneity index for a given discrete probability distribution.

Usage

gini(m, prob)

Arguments

m
Number of categories
prob
Vector of the probability distribution or relative frequencies

See Also

laakso

Examples

Run this code
m<-7
prob<-c(0.04,0.04,0.05,0.10,0.21,0.32,0.24)
gini(m, prob)

Run the code above in your browser using DataLab