Closed ibecav closed 5 years ago
This is great work, Chuck! I always forget that we support ratio
argument in ggpiestats
and ggbarstats
functions.
Can you make a PR
?
P.S. Maybe the argument p
can be renamed to ratio
for consistency?
Sure likely Monday what do you want to call the function and what helper file?
Sent from my mobile please forgive my brevity
On Jun 8, 2019, at 09:21, Indrajeet Patil notifications@github.com wrote:
This is great work, Chuck! I always forget that we support ratio argument in ggpiestats and ggbarstats functions.
Can you make a PR?
P.S. Maybe the argument p can be renamed to ratio for consistency?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Let's call this something like cramer_v_ci
?
This will go in the following file: https://github.com/IndrajeetPatil/ggstatsplot/blob/master/R/helpers_ggcatstats.R
The tests can be added to a separate file test_cramer_v_ci
.
Submitting PR
I made it a new issue because it's a nuance rather than a complete problem. The current solution of pulling from
DescTools::CramerV
works but does not allow for specifying the the probabilities the user wants in the GoF test. It only does equal splits, e.g. formtcars$am
it only tests the hypothesis the split is 50/50. That's not supporting theratio
parameter inggpiestats
. So I took the code and cleaned, formatted, stripped off unnecessary components and added some basic documentation. Not sure where you'll want to name it, park it or even whether you'll want to adopt it so rather than a PR here's the code and a reprex...Created on 2019-06-07 by the reprex package (v0.3.0)