pysal / segregation

Segregation Measurement, Inferential Statistics, and Decomposition Analysis
https://pysal.org/segregation/
BSD 3-Clause "New" or "Revised" License
112 stars 26 forks source link

[ENH] extend inference framework to multigroup indices #86

Closed knaaptime closed 5 years ago

renanxcortes commented 5 years ago

One of the options for this is to use the bootstrap approach present in SingleValueTest. I think we could also compare two values of multigroup segregation measures with the random_label approach of TwoValueTest.

renanxcortes commented 5 years ago

Should we create different classes for these tests (Like SingleValueMultiTest or TwoValueMultiTest) or we, somehow, allow multigroup measures for the same class? I don't have a strong opinion, but I have a sense that if we go with the second option the class can get a little funky since the approaches for each type of index can be dependent on the api and nature of the input data.

renanxcortes commented 5 years ago

On the other hand, creating in the same class, this keeps the api more consistent. In this case, I would create an internal check to see if the input class is multigroup or not (some kind of string check) and then tweak the function accordingly to the input.

For example, the analogous of the "evenness" approach, would be generating a multinomial distribution with the global probability vector of the compositions. The analogous of "bootstrap" would be just performing the bootstrap similar to the one group value and so on.

renanxcortes commented 5 years ago

Closing as this was addressed in https://github.com/pysal/segregation/pull/122.