Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dabest/_api.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 2 additions & 0 deletions dabest/_bootstrap_tools.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion dabest/_dabest_object.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion dabest/_delta_objects.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 4 additions & 2 deletions dabest/_effsize_objects.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion dabest/_stats_tools/confint_1group.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion dabest/_stats_tools/confint_2group_diff.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion dabest/_stats_tools/effsize.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion dabest/_stats_tools/precompile.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion dabest/forest_plot.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion dabest/misc_tools.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 2 additions & 0 deletions dabest/multi.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 6 additions & 5 deletions dabest/plot_tools.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion dabest/plotter.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion nbs/02-about.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion nbs/API/effsize_objects.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 3 additions & 4 deletions nbs/API/plot_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions nbs/tutorials/04-proportion_plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -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});"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion nbs/tutorials/08-plot_aesthetics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down
Loading