diff --git a/dabest/_api.py b/dabest/_api.py index cf34b9f4..62d0218d 100644 --- a/dabest/_api.py +++ b/dabest/_api.py @@ -1,4 +1,6 @@ -"""Loading data and relevant groups""" +"""Loading data and relevant groups + +Docs: https://acclab.github.io/DABEST-python/API/load.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/load.ipynb. diff --git a/dabest/_bootstrap_tools.py b/dabest/_bootstrap_tools.py index b4333635..4c3c2535 100644 --- a/dabest/_bootstrap_tools.py +++ b/dabest/_bootstrap_tools.py @@ -1,3 +1,5 @@ +"""Docs: https://acclab.github.io/DABEST-python/API/bootstrap.html.md""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/bootstrap.ipynb. # %% auto #0 diff --git a/dabest/_dabest_object.py b/dabest/_dabest_object.py index 53b36360..3153ed61 100644 --- a/dabest/_dabest_object.py +++ b/dabest/_dabest_object.py @@ -1,4 +1,6 @@ -"""Main class for estimating statistics and generating plots.""" +"""Main class for estimating statistics and generating plots. + +Docs: https://acclab.github.io/DABEST-python/API/dabest_object.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/dabest_object.ipynb. diff --git a/dabest/_delta_objects.py b/dabest/_delta_objects.py index b843ce06..3a201cfe 100644 --- a/dabest/_delta_objects.py +++ b/dabest/_delta_objects.py @@ -1,4 +1,6 @@ -"""Auxiliary delta classes for estimating statistics and generating plots.""" +"""Auxiliary delta classes for estimating statistics and generating plots. + +Docs: https://acclab.github.io/DABEST-python/API/delta_objects.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/delta_objects.ipynb. diff --git a/dabest/_effsize_objects.py b/dabest/_effsize_objects.py index fce3e822..0671958c 100644 --- a/dabest/_effsize_objects.py +++ b/dabest/_effsize_objects.py @@ -1,4 +1,6 @@ -"""The auxiliary classes involved in the computations of bootstrapped effect sizes.""" +"""The auxiliary classes involved in the computations of bootstrapped effect sizes. + +Docs: https://acclab.github.io/DABEST-python/API/effsize_objects.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/effsize_objects.ipynb. @@ -1304,7 +1306,7 @@ def plot( group_summaries : ['mean_sd', 'median_quartiles', 'None'], default "mean_sd". Plots the summary statistics for each group. If 'mean_sd', then the mean and standard deviation of each group is plotted as a - notched line beside each group. If 'median_quantiles', then the + notched line beside each group. For proportion and Sankey plots, this error is the binomial standard error (BSE), sqrt(p(1-p)/n), not the SD. If 'median_quantiles', then the median and 25th and 75th percentiles of each group is plotted instead. If 'None', the summaries are not shown. fig_size : tuple, default None diff --git a/dabest/_stats_tools/confint_1group.py b/dabest/_stats_tools/confint_1group.py index cc71e389..20e77f6d 100644 --- a/dabest/_stats_tools/confint_1group.py +++ b/dabest/_stats_tools/confint_1group.py @@ -1,4 +1,6 @@ -"""A range of functions to compute bootstraps for a single sample.""" +"""A range of functions to compute bootstraps for a single sample. + +Docs: https://acclab.github.io/DABEST-python/API/confint_1group.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/confint_1group.ipynb. diff --git a/dabest/_stats_tools/confint_2group_diff.py b/dabest/_stats_tools/confint_2group_diff.py index 03d7df11..c662ea29 100644 --- a/dabest/_stats_tools/confint_2group_diff.py +++ b/dabest/_stats_tools/confint_2group_diff.py @@ -1,4 +1,6 @@ -"""A range of functions to compute bootstraps for the mean difference""" +"""A range of functions to compute bootstraps for the mean difference + +Docs: https://acclab.github.io/DABEST-python/API/confint_2group_diff.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/confint_2group_diff.ipynb. diff --git a/dabest/_stats_tools/effsize.py b/dabest/_stats_tools/effsize.py index 216a513f..67855bb3 100644 --- a/dabest/_stats_tools/effsize.py +++ b/dabest/_stats_tools/effsize.py @@ -1,4 +1,6 @@ -"""A range of functions to compute various effect sizes.""" +"""A range of functions to compute various effect sizes. + +Docs: https://acclab.github.io/DABEST-python/API/effsize.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/effsize.ipynb. diff --git a/dabest/_stats_tools/precompile.py b/dabest/_stats_tools/precompile.py index e6205c0f..c0e0f2f9 100644 --- a/dabest/_stats_tools/precompile.py +++ b/dabest/_stats_tools/precompile.py @@ -1,4 +1,6 @@ -"""A tool to pre-compile Numba functions for speeding up DABEST bootstrapping""" +"""A tool to pre-compile Numba functions for speeding up DABEST bootstrapping + +Docs: https://acclab.github.io/DABEST-python/API/precompile.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/precompile.ipynb. diff --git a/dabest/forest_plot.py b/dabest/forest_plot.py index b404e963..eca7ed18 100644 --- a/dabest/forest_plot.py +++ b/dabest/forest_plot.py @@ -1,4 +1,6 @@ -"""Creating forest plots from contrast objects.""" +"""Creating forest plots from contrast objects. + +Docs: https://acclab.github.io/DABEST-python/API/forest_plot.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/forest_plot.ipynb. diff --git a/dabest/misc_tools.py b/dabest/misc_tools.py index d0a56422..4060b7ca 100644 --- a/dabest/misc_tools.py +++ b/dabest/misc_tools.py @@ -1,4 +1,6 @@ -"""Convenience functions that don't directly deal with plotting or bootstrap computations are placed here.""" +"""Convenience functions that don't directly deal with plotting or bootstrap computations are placed here. + +Docs: https://acclab.github.io/DABEST-python/API/misc_tools.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/misc_tools.ipynb. diff --git a/dabest/multi.py b/dabest/multi.py index 50b38721..b132f143 100644 --- a/dabest/multi.py +++ b/dabest/multi.py @@ -1,3 +1,5 @@ +"""Docs: https://acclab.github.io/DABEST-python/API/multi.html.md""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/multi.ipynb. # %% auto #0 diff --git a/dabest/plot_tools.py b/dabest/plot_tools.py index 45cb2134..9fa023f1 100644 --- a/dabest/plot_tools.py +++ b/dabest/plot_tools.py @@ -1,4 +1,6 @@ -"""A set of convenience functions used for producing plots in `dabest`.""" +"""A set of convenience functions used for producing plots in `dabest`. + +Docs: https://acclab.github.io/DABEST-python/API/plot_tools.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/plot_tools.ipynb. @@ -70,7 +72,7 @@ def error_bar( data: pd.DataFrame, # This DataFrame should be in 'long' format. x: str, # x column to be plotted. y: str, # y column to be plotted. - type: str = "mean_sd", # Choose from ['mean_sd', 'median_quartiles']. Plots the summary statistics for each group. If 'mean_sd', then the mean and standard deviation of each group is plotted as a gapped line. If 'median_quantiles', then the median and 25th and 75th percentiles of each group is plotted instead. + type: str = "mean_sd", # Choose from ['mean_sd', 'median_quartiles']. Plots the summary statistics for each group. If 'mean_sd', then the mean and standard deviation of each group is plotted as a gapped line. For proportion and Sankey plots, the error shown is the binomial standard error (BSE), sqrt(p(1-p)/n), rather than the SD. If 'median_quantiles', then the median and 25th and 75th percentiles of each group is plotted instead. offset: float = 0.2, # Give a single float (that will be used as the x-offset of all gapped lines), or an iterable containing the list of x-offsets. ax=None, # If a matplotlib Axes object is specified, the gapped lines will be plotted in order on this axes. If None, the current axes (plt.gca()) is used. line_color="black", # The color of the gapped lines. @@ -85,11 +87,10 @@ def error_bar( ): """ Function to plot the standard deviations as vertical errorbars. + For proportion and Sankey plots, the vertical bars instead show the + BSE of the proportion. The mean is a gap defined by negative space. - This function combines the functionality of gapped_lines(), - proportional_error_bar(), and sankey_error_bar(). - """ if gap_width_percent < 0 or gap_width_percent > 100: diff --git a/dabest/plotter.py b/dabest/plotter.py index 23302e39..f40685c8 100644 --- a/dabest/plotter.py +++ b/dabest/plotter.py @@ -1,4 +1,6 @@ -"""Creating estimation plots.""" +"""Creating estimation plots. + +Docs: https://acclab.github.io/DABEST-python/API/plotter.html.md""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/plotter.ipynb. diff --git a/nbs/02-about.ipynb b/nbs/02-about.ipynb index 812fd714..28da38c5 100644 --- a/nbs/02-about.ipynb +++ b/nbs/02-about.ipynb @@ -32,7 +32,7 @@ "\n", "- Statistics supervision by Hyungwon Choi\n", "\n", - "- Alpha testers from the Claridge-Chang lab: [Sangyu Xu](https://github.com/sangyu), [Xianyuan Zhang](https://github.com/XYZfar), [Farhan Mohammad](https://github.com/farhan8igib), Jurga MituzaitÄ—, Stanislav Ott, Tayfun Tumkaya, Jonathan Anns, Nicole Lee and Yishan Mai.\n", + "- Alpha testers from the Claridge-Chang lab: [Sangyu Xu](https://github.com/sangyu), [Xianyuan Zhang](https://github.com/XYZfar), [Farhan Mohammad](https://github.com/farhan8igib), Jurga MituzaitÄ—, Stanislav Ott, [Tayfun Tumkaya](https://github.com/ttumkaya), [Jonathan Anns](https://github.com/JAnns98), [Nicole Lee](https://github.com/mnicolee) and [Yishan Mai](https://github.com/maiyishan).\n", "\n", "- DizietAsahi ([DizietAsahi](https://github.com/DizietAsahi)) with [PR #86](https://github.com/ACCLAB/DABEST-python/pull/86): Fix bugs in slopegraph and reference line keyword parsing.\n", "\n", diff --git a/nbs/API/effsize_objects.ipynb b/nbs/API/effsize_objects.ipynb index 1d200a2e..22fe2412 100644 --- a/nbs/API/effsize_objects.ipynb +++ b/nbs/API/effsize_objects.ipynb @@ -1515,7 +1515,7 @@ " group_summaries : ['mean_sd', 'median_quartiles', 'None'], default \"mean_sd\".\n", " Plots the summary statistics for each group. If 'mean_sd', then\n", " the mean and standard deviation of each group is plotted as a\n", - " notched line beside each group. If 'median_quantiles', then the\n", + " notched line beside each group. For proportion and Sankey plots, this error is the binomial standard error (BSE), sqrt(p(1-p)/n), not the SD. If 'median_quantiles', then the\n", " median and 25th and 75th percentiles of each group is plotted\n", " instead. If 'None', the summaries are not shown.\n", " fig_size : tuple, default None\n", diff --git a/nbs/API/plot_tools.ipynb b/nbs/API/plot_tools.ipynb index 1ab8cddf..3e876553 100644 --- a/nbs/API/plot_tools.ipynb +++ b/nbs/API/plot_tools.ipynb @@ -121,7 +121,7 @@ " data: pd.DataFrame, # This DataFrame should be in 'long' format.\n", " x: str, # x column to be plotted.\n", " y: str, # y column to be plotted.\n", - " type: str = \"mean_sd\", # Choose from ['mean_sd', 'median_quartiles']. Plots the summary statistics for each group. If 'mean_sd', then the mean and standard deviation of each group is plotted as a gapped line. If 'median_quantiles', then the median and 25th and 75th percentiles of each group is plotted instead.\n", + " type: str = \"mean_sd\", # Choose from ['mean_sd', 'median_quartiles']. Plots the summary statistics for each group. If 'mean_sd', then the mean and standard deviation of each group is plotted as a gapped line. For proportion and Sankey plots, the error shown is the binomial standard error (BSE), sqrt(p(1-p)/n), rather than the SD. If 'median_quantiles', then the median and 25th and 75th percentiles of each group is plotted instead.\n", " offset: float = 0.2, # Give a single float (that will be used as the x-offset of all gapped lines), or an iterable containing the list of x-offsets.\n", " ax=None, # If a matplotlib Axes object is specified, the gapped lines will be plotted in order on this axes. If None, the current axes (plt.gca()) is used.\n", " line_color=\"black\", # The color of the gapped lines.\n", @@ -136,11 +136,10 @@ "):\n", " \"\"\"\n", " Function to plot the standard deviations as vertical errorbars.\n", + " For proportion and Sankey plots, the vertical bars instead show the\n", + " BSE of the proportion.\n", " The mean is a gap defined by negative space.\n", "\n", - " This function combines the functionality of gapped_lines(),\n", - " proportional_error_bar(), and sankey_error_bar().\n", - "\n", " \"\"\"\n", "\n", " if gap_width_percent < 0 or gap_width_percent > 100:\n", diff --git a/nbs/tutorials/04-proportion_plot.ipynb b/nbs/tutorials/04-proportion_plot.ipynb index 69a9afbf..fb359b53 100644 --- a/nbs/tutorials/04-proportion_plot.ipynb +++ b/nbs/tutorials/04-proportion_plot.ipynb @@ -646,7 +646,7 @@ "id": "243a1a0b", "metadata": {}, "source": [ - "Instead of a Gardner-Altman plot, you can generate a **Cumming estimation plot** by setting ``float_contrast=False`` in the ``.plot()`` method. This will plot the bootstrap effect sizes below the raw data." + "Instead of a Gardner-Altman plot, you can generate a **Cumming estimation plot** by setting ``float_contrast=False`` in the ``.plot()`` method. This will plot the bootstrap effect sizes below the raw data. The gapped lines show the mean (gap) and the binomial standard error (BSE) of each group." ] }, { @@ -1098,7 +1098,7 @@ "id": "17832542", "metadata": {}, "source": [ - "The Sankey plots for paired proportions also supports the ``float_contrast`` parameter, which can be set to ``False`` to produce a **Cumming estimation plot**.\n" + "The Sankey plots for paired proportions also supports the ``float_contrast`` parameter, which can be set to ``False`` to produce a **Cumming estimation plot**. The gapped lines show the mean and the BSE of each group.\n" ] }, { @@ -1687,7 +1687,7 @@ } ], "source": [ - "two_groups_unpaired.mean_diff.plot(barplot_kwargs={\"alpha\":0.5, \"edgecolor\":\"red\", \"linewidth\":2, 'errorbar': ('sd', 0.1)});" + "two_groups_unpaired.mean_diff.plot(barplot_kwargs={\"alpha\":0.5, \"edgecolor\":\"red\", \"linewidth\":2});" ] }, { diff --git a/nbs/tutorials/08-plot_aesthetics.ipynb b/nbs/tutorials/08-plot_aesthetics.ipynb index 450cdd55..5d20a4aa 100644 --- a/nbs/tutorials/08-plot_aesthetics.ipynb +++ b/nbs/tutorials/08-plot_aesthetics.ipynb @@ -1299,7 +1299,7 @@ "source": [ "The type of group summary can be specified via `group_summaries` in the `.plot()` method and must be one of these: `'median_quartiles'`, `'mean_sd'`, `None`.\n", "\n", - "By default, the group summary is set to `'mean_sd'`." + "By default, the group summary is set to `'mean_sd'`. For proportion and Sankey plots, the `'mean_sd'` gapped line shows the BSE, not the standard deviation." ] }, {