divilian / specstar

Combines SPECscape and SPECnet into one project
1 stars 1 forks source link

Statistical comparison of Gini coefficients #37

Closed venkatachalapathy closed 5 years ago

venkatachalapathy commented 5 years ago

Once we have Gini coefficients from different conditions, we may have to compare them statistically. The issue is to create such tests or compare histograms directly with standard methods.

venkatachalapathy commented 5 years ago

@srikanthmudigonda and @WheezePuppet , are there standard tests for this? And in what packages?

jeffg828 commented 5 years ago

Hmm, ginis are ratios, does that mean two population proportion test? Asking for a friend.

On Mon, Jun 3, 2019, 15:04 venkatachalapathy notifications@github.com wrote:

@srikanthmudigonda https://github.com/srikanthmudigonda and @WheezePuppet https://github.com/WheezePuppet , are there standard tests for this? And in what packages?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/WheezePuppet/specstar/issues/37?email_source=notifications&email_token=ALNPB246HMZN6TMWMT3LCHTPYVTK3A5CNFSM4HSDTKZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW2MA7Q#issuecomment-498385022, or mute the thread https://github.com/notifications/unsubscribe-auth/ALNPB25ON45FVLZUNXGSKDTPYVTK3ANCNFSM4HSDTKZA .

venkatachalapathy commented 5 years ago

https://cran.r-project.org/web/packages/dineq/index.html

https://cran.r-project.org/web/packages/dineq/index.html

both seem to do it (using the proportion test like what you (jeff) suggested) via confidence intervals but since we just removed RCall dependencies, we have either create tests from scratch or code it ourselves. But the ineq package we used don't seem to have this feature.

and also this one

https://www.rdocumentation.org/packages/DescTools/versions/0.99.19/topics/Gini

divilian commented 5 years ago

Surely we're not claiming that standard statistical tests like the ones you learn about in STAT 101 are not available here?? https://github.com/JuliaStats (See, for instance, https://github.com/JuliaStats/HypothesisTests.jl) If we actually need to call R from Julia in order to run a freaking t-test, I'll jump off the highest bridge in my field of view with no parachute.

venkatachalapathy commented 5 years ago

You don't have to jump of the bridge, Stephen. t-tests will do for now. I was kind of expecting some special test just for Gini comparisons. t-tests usually assume normally distributed data. I do not know enough about Gini to know if they are asymptotically normally distributed. But OK.... we can make do with what we have ;)

jeffg828 commented 5 years ago

Hmm, I took a gander at that link... Not so sure about the t test straight up. Looks like the distribution for ginis has a funky srandard error. Worst case, can you export what you need to a file and just run R on the file?

On Tue, Jun 4, 2019, 17:43 venkatachalapathy notifications@github.com wrote:

You don't have to jump of the bridge, Stephen. t-tests will do for now. I was kind of expecting some special test just for Gini comparisons. t-tests usually assume normally distributed data. I do not know enough about Gini to know if they are asymptotically normally distributed. But OK.... we can make do with what we have ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/WheezePuppet/specstar/issues/37?email_source=notifications&email_token=ALNPB242VGN5QC7PPYP5OCTPY3OYJA5CNFSM4HSDTKZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW56X3A#issuecomment-498854892, or mute the thread https://github.com/notifications/unsubscribe-auth/ALNPB27AGEDY5EOPTBHNFDDPY3OYJANCNFSM4HSDTKZA .

divilian commented 5 years ago

Ah right, normally distributed data, which might well not be true for Ginis. Good point. So, I see that https://github.com/JuliaStats/HypothesisTests.jl also supports Wilcoxon and Mann-Whitney tests -- would these be more appropriate?

(Btw, my "jump off a bridge" comment was not related to t-tests being necessarily the correct thing, but rather the idea that we would have to call out to R for something like this. I would be astonished if whatever the correct test is for this were not implemented natively in Julia.)

venkatachalapathy commented 5 years ago

40 contains links to R library DescTools

This should do the job for now.

venkatachalapathy commented 5 years ago

I'm closing this as we have enough of this figured out to complete phase 1 and pushed pushed the two-sample version to phase 2+.