Nei diversity indice:

if pij represents the i class frequency of the j variable, the Nei diversity indice is:

INei,j = 1 - Si pij2

The indice for all of variables will be sum of indices for each variable

INei = Sj INei,j2

< > ^