Infs in bootstrap differences jams up plotting
Closed this issue · 0 comments
josesho commented
c = [1.45246, 1.19208, 1.61360, 1.12898, 1.27610]
t = [1.88, 2.33249, 0.80159, 1.44444]
df = pd.DataFrame({"group": np.repeat("control", len(c)).tolist() + np.repeat("test", len(t)).tolist(),
"value": c + t})
db = dabest.load(df, x="group", y="value", idx=["control", "test"])
db.hedges_g
produces
/Users/whho/anaconda3/envs/dabest-dev-py3.7/lib/python3.7/site-packages/dabest/_stats_tools/effsize.py:224: RuntimeWarning: divide by zero encountered in double_scalars
return M / pooled_sd
DABEST v0.2.5
=============
Good afternoon!
The current time is Tue Oct 1 16:16:10 2019.
The unpaired Hedges' g between control and test is 0.553 [95%CI -1.58, 2.41].
The two-sided p-value of the Mann-Whitney test is 0.54.
5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.
The p-value(s) reported are the likelihood(s) of observing the effect size(s),
if the null hypothesis of zero difference is true.
To get the results of all valid statistical tests, use `.hedges_g.statistical_tests`
and an attempt to create the Hedges' g estimation plot results in
IndexError: list index out of range
Inspection of db.hedges_g.results.bootstraps
reveals
0 [-inf, -7.413427045394007, -5.693852539205496,...
Name: bootstraps, dtype: object
We will have to discard the ±Infs before saving the bootstrap values....
First noted on the estimationstats webapp.