ACCLAB/DABEST-python

Plots for Shared Control Groups with Different Number of Units

Closed this issue · 6 comments

Dear DABEST team,

Thank you for providing this beautiful way to show estimation statistics!

When I tried to plot the shared control groups with different numbers of units, it only showed the mean and the std for the group that has the most number of units. But it worked fine when I uploaded my csv and analyzed online on the estimationstats.com. Do you have any idea why this is happening? Thank you so much!

Best,
Ethan

Can you provide us a minimally reproducible code sample demonstrating the unexpected behavior?

Could you also check what version your DABEST is with

import dabest
print(dabest.__version__)

Thanks.

Hi Josesho,

Here is a simple demonstration:

import numpy as np
import pandas as pd
import dabest
print("We're using DABEST v{}".format(dabest.__version__))`
We're using DABEST v0.2.6
from scipy.stats import norm

np.random.seed(9999)

c1DF = pd.DataFrame({'Control':norm.rvs(loc=3, scale=0.4, size=20)})
t1DF = pd.DataFrame({'Test 1': norm.rvs(loc=3.5, scale=0.5, size=30)})
t2DF = pd.DataFrame({'Test 2': norm.rvs(loc=2.5, scale=0.6, size=15)})
t3DF = pd.DataFrame({'Test 3': norm.rvs(loc=3, scale=0.75, size=30)})
t4DF = pd.DataFrame({'Test 4': norm.rvs(loc=3.5, scale=0.75, size=20)})
t5DF = pd.DataFrame({'Test 5': norm.rvs(loc=3.25, scale=0.4, size=20)})
t6DF = pd.DataFrame({'Test 6': norm.rvs(loc=3.25, scale=0.4, size=15)})

df = pd.concat([c1DF,t1DF,t2DF,t3DF,t4DF,t5DF,t6DF],axis=1)

shared_control = dabest.load(df, idx=("Control", "Test 1",
                                      "Test 2", "Test 3",
                                      "Test 4", "Test 5", "Test 6")
                            )

shared_control.mean_diff.plot();

image

Hi @XiangWanggithub

This will be patched in v0.2.7, which should be released early next week. Will ping back here when that's done.

Joses

Great! Thank you so much!

Fixed with #80. Please use pip install --upgrade dabest to install v0.2.7.