def oneway(x, y, data=None, control=None, iterations=24000, burn=4000, verbose=False):

    if data is None:
        x, y, _, data = jp.components.create_df(x, y, None)

    df = data.copy()
    df = df.reset_index()
    df[x] = df[x].astype('str')
    df[y] = df[y].astype('float').dropna()

    groups = sorted(set(df[x]))

    if len(groups) > 2 and control is None:
        raise ValueError('Need a control group')
    elif len(groups) <= 2 and control is None:
        control = groups[0]

    means = {}  # prior distributions
    sigmas = {}  #
    deltas_mean = {}  # deltas vs control
    deltas_sig = {}
    obs = {}  # observations
    nu = {}

    def delta(dist, control, exp):
        return dist[exp] - dist[control]

    for group in groups:
        means[group] = pm.Uniform('mean_{}'.format(group), np.percentile(df[y], 1), np.percentile(df[y], 99))
        nu[group] = pm.Uniform('nu_{}'.format(group), 0, 1000)
        sigmas[group] = pm.Gamma('sigma_{}'.format(group), np.median(df[y].dropna()), nu[group])
        obs[group] = pm.Normal('obs_{}'.format(group), means[group],  1/sigmas[group]**2, value=df[df[x]==group][y],
                               observed=True, trace=True)

    for group in groups:
        if group == control:
            continue
        else:
            deltas_mean[group] = pm.Deterministic(delta, doc='Delta function of mean', name='deltam_{}'.format(group),
                                                  parents={'dist': means, 'exp': group, 'control': control}, trace=True)
            deltas_sig[group] = pm.Deterministic(delta, doc='Delta function of sigma', name='deltas_{}'.format(group),
                                                 parents={'dist': sigmas, 'exp': group, 'control': control}, trace=True)

    mylist = [means[i] for i in groups] + [obs[i] for i in groups] + [deltas_mean[i] for i in groups if i != control]
    mylist += [sigmas[i] for i in groups] + [nu[i] for i in groups] + [deltas_sig[i] for i in groups if i != control]

    model = pm.Model(mylist)
    map_ = pm.MAP(model, )
    map_.fit()
    mcmc = pm.MCMC(model, )
    mcmc.sample(iterations, burn=burn, progress_bar=verbose)

    res = JbResult(mcmc, groups)

    for group in groups:

        if res.df is None:
            res.df = pd.DataFrame()

            res.df['Mean'] = mcmc.trace('mean_{}'.format(group))[:]
            res.df['Sigma'] = mcmc.trace('sigma_{}'.format(group))[:]
            res.df['Group'] = group

            if group == control:
                continue
            res.df['Mean Delta'] = mcmc.trace('deltam_{}'.format(group))[:]
            res.df['Sigma Delta'] = mcmc.trace('deltas_{}'.format(group))[:]
        else:
            tdf = pd.DataFrame()
            tdf['Mean'] = mcmc.trace('mean_{}'.format(group))[:]
            tdf['Sigma'] = mcmc.trace('sigma_{}'.format(group))[:]
            tdf['Group'] = group

            if group == control:
                res.df = res.df.append(tdf)
                continue

            tdf['Mean Delta'] = mcmc.trace('deltam_{}'.format(group))[:]
            tdf['Sigma Delta'] = mcmc.trace('deltas_{}'.format(group))[:]

            res.df = res.df.append(tdf)

    return res
Uninstall slider from the slider master.
dataset/ETHPy150Open beltashazzer/jmpy/jmpy/bayes/oneway.py/oneway--crossover with--dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/yarn_slider/slider.py/uninstall