Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infs in bootstrap differences jams up plotting #72

Closed
josesho opened this issue Oct 1, 2019 · 0 comments
Closed

Infs in bootstrap differences jams up plotting #72

josesho opened this issue Oct 1, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@josesho
Copy link
Member

josesho commented Oct 1, 2019

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.

@josesho josesho added the bug label Oct 1, 2019
@josesho josesho self-assigned this Oct 1, 2019
@josesho josesho added this to the v0.2.6 milestone Oct 1, 2019
@josesho josesho mentioned this issue Oct 7, 2019
@josesho josesho closed this as completed Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant