Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TheilD within group inequality #15

@RicoFio

Description

@RicoFio

Hi there!

I am currently trying to use the TheilD index for my research on transport access equality. As far as I understood, the definition of the decompose Theil index is this one. Then, what also makes sense to me, both components are defined positively and, accordingly the Theil index is bound in [0,inf].

Hence this result seems weird to me:

from inequality.theil import TheilD
TheilD(np.array([0,0,0,10,10,10]),[0,0,0,1,1,1]).wg[0]
>>> -0.6931471805599453

This arises because the within-group inequality is calculated by doing self.wg = T - bg in theil.py L 129.
Probably, I misunderstood something -> clarification on how to interpret this within-group component would be highly appreciated.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions