Skip to content

Commit

Permalink
Merge pull request #173 from ACCLAB/patch-splash-page-edit
Browse files Browse the repository at this point in the history
Documentation Edits
  • Loading branch information
Jacobluke- committed Mar 22, 2024
2 parents 1cc16d3 + 781f31d commit ff779d2
Show file tree
Hide file tree
Showing 28 changed files with 1,440 additions and 1,104 deletions.
24 changes: 20 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@

<!-- do not remove -->

## 2024.03.29

### New Features

- **Standardized Delta-delta Effect Size**: We added a new metric akin to a Hedges’ g for delta-delta effect size, which allows comparisons between delta-delta effects generated from metrics with different units.

- **New Paired Proportion Plot**: This feature builds upon the existing proportional analysis capabilities by introducing advanced aesthetics and clearer visualization of changes in proportions between different groups, inspired by the informative nature of Sankey Diagrams. It's particularly useful for studies that require detailed examination of how proportions shift in paired observations.

- **Customizable Swarm Plot**: Enhancements allow for tailored swarm plot aesthetics, notably the adjustment of swarm sides to produce asymmetric swarm plots. This customization enhances data representation, making visual distinctions more pronounced and interpretations clearer.

### Enhancement

- **Miscellaneous Improvements**: This version also encompasses a broad range of miscellaneous enhancements, including bug fixes, Bootstrapping speed improvements, new templates for raising issues, and updated unit tests. These improvements are designed to streamline the user experience, increase the software's stability, and expand its versatility. By addressing user feedback and identified issues, DABEST continues to refine its functionality and reliability.



## 2023.03.29

### New Features
- Add new form of paired proportion plots for a better support of Repeated Measures
- **Repeated measures**: Augments the prior function for plotting (independent) multiple test groups versus a shared control; it can now do the same for repeated-measures experimental designs. Thus, together, these two methods can be used to replace both flavors of the 1-way ANOVA with an estimation analysis.

- **Proportional data**: Generates proportional bar plots, proportional differences, and calculates Cohen’s h. Also enables plotting Sankey diagrams for paired binary data. This is the estimation equivalent to a bar chart with Fischer’s exact test.

## 0.2.3
- **The ∆∆ plot**: Calculates the delta-delta (∆∆) for 2 × 2 experimental designs and plots the four groups with their relevant effect sizes. This design can be used as a replacement for the 2 × 2 ANOVA.

### Bug Fixes
- Fixes a bug that jammed up when the xvar column was already a pandas Categorical. Now we check for this and act appropriately.
- **Mini-meta**: Calculates and plots a weighted delta (∆) for meta-analysis of experimental replicates. Useful for summarizing data from multiple replicated experiments, for example by different scientists in the same lab, or the same scientist at different times. When the observed values are known (and share a common metric), this makes meta-analysis available as a routinely accessible tool.
61 changes: 33 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,37 @@

## Recent Version Update

On 20 March 2023, we officially released **DABEST v2023.02.14 for
Python**. This new version provided the following new features:

1. **Repeated measures.** Augments the prior function for plotting
(independent) multiple test groups versus a shared control; it can
now do the same for repeated-measures experimental designs. Thus,
together, these two methods can be used to replace both flavors of
the 1-way ANOVA with an estimation analysis.

2. **Proportional data.** Generates proportional bar plots,
proportional differences, and calculates Cohen’s h. Also enables
plotting Sankey diagrams for paired binary data. This is the
estimation equivalent to a bar chart with Fisher’s exact test.

3. **The $\Delta\Delta$ plot.** Calculates the delta-delta
($\Delta\Delta$) for 2 × 2 experimental designs and plots the four
groups with their relevant effect sizes. This design can be used as
a replacement for the 2 × 2 ANOVA.

4. **Mini-meta.** Calculates and plots a weighted delta ($\Delta$) for
meta-analysis of experimental replicates. Useful for summarizing
data from multiple replicated experiments, for example by different
scientists in the same lab, or the same scientist at different
times. When the observed values are known (and share a common
metric), this makes meta-analysis available as a routinely
accessible tool.
On 22 March 2024, we officially released **DABEST v2024.3.29 for
Python**. This new version provides several new features and includes
performance improvements.

1. **New Paired Proportion Plot**: This feature builds upon the
existing proportional analysis capabilities by introducing advanced
aesthetics and clearer visualization of changes in proportions
between different groups, inspired by the informative nature of
Sankey Diagrams. It’s particularly useful for studies that require
detailed examination of how proportions shift in paired
observations.

2. **Customizable Swarm Plot**: Enhancements allow for tailored swarm
plot aesthetics, notably the adjustment of swarm sides to produce
asymmetric swarm plots. This customization enhances data
representation, making visual distinctions more pronounced and
interpretations clearer.

3. **Standardized Delta-delta Effect Size**: We added a new metric akin
to a Hedges’ g for delta-delta effect size, which allows comparisons
between delta-delta effects generated from metrics with different
units.

4. **Miscellaneous Improvements**: This version also encompasses a
broad range of miscellaneous enhancements, including bug fixes,
Bootstrapping speed improvements, new templates for raising issues,
and updated unit tests. These improvements are designed to
streamline the user experience, increase the software’s stability,
and expand its versatility. By addressing user feedback and
identified issues, DABEST continues to refine its functionality and
reliability.

## Contents

Expand Down Expand Up @@ -128,8 +133,8 @@ iris_dabest.mean_diff.plot();
dataset](iris.png)

Please refer to the official
[tutorial](https://acclab.github.io/DABEST-python-docs/tutorial.html)
for more useful code snippets.
[tutorial](https://acclab.github.io/DABEST-python/) for more useful code
snippets.

## How to cite

Expand Down
2 changes: 1 addition & 1 deletion dabest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from ._effsize_objects import TwoGroupsEffectSize, PermutationTest
from ._dabest_object import Dabest

__version__ = "2023.03.29"
__version__ = "2024.03.29"
37 changes: 37 additions & 0 deletions nbs/01-getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,43 @@
"- order: 1"
]
},
{
"cell_type": "markdown",
"id": "5b3dcdd6",
"metadata": {},
"source": [
"## Introduction"
]
},
{
"cell_type": "markdown",
"id": "2aebebc2",
"metadata": {},
"source": [
"DABEST is a package for **D**ata **A**nalysis with **B**ootstrapped **EST**imation\n",
"\n",
"[Estimation statistics](https://en.wikipedia.org/wiki/Estimation_statistics) is a simple framework that avoids the [pitfalls](https://www.nature.com/articles/nmeth.3288) of significance testing. It uses familiar statistical concepts: means, mean differences, and error bars. More importantly, it focuses on the effect size of one’s experiment/intervention, as opposed to a false dichotomy engendered by *P* values."
]
},
{
"cell_type": "markdown",
"id": "0fc075f5",
"metadata": {},
"source": [
"An estimation plot has two key features.\n",
"\n",
"1. It **presents all datapoints** as a swarmplot, which orders each point to display the underlying distribution.\n",
"2. It presents the **effect size** as a **bootstrap 95% confidence interval** on a **separate but aligned axes**."
]
},
{
"cell_type": "markdown",
"id": "e4c2e459",
"metadata": {},
"source": [
"DABEST powers [estimationstats.com](estimationstats.com), allowing everyone access to high-quality estimation plots."
]
},
{
"cell_type": "markdown",
"id": "d1d5cb1a",
Expand Down
12 changes: 3 additions & 9 deletions nbs/02-about.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"\n",
"DABEST is written in Python by [Joses W. Ho](https://twitter.com/jacuzzijo), with design and input from [Adam Claridge-Chang](https://twitter.com/adamcchang) and other [lab members](https://www.claridgechang.net/people.html).\n",
"\n",
"Additional features in v2023.02.14 were added by [Yixuan Li](https://github.com/LI-Yixuan), [Zinan Lu](https://github.com/Jacobluke-) and [Rou Zhang](https://github.com/ZHANGROU-99).\n",
"Features in v2024.03.29 were added by [Zinan Lu](https://github.com/Jacobluke-), [Kah Seng Lian](https://github.com/sunroofgod).\n",
"\n",
"Features in v2023.02.14 were added by [Yixuan Li](https://github.com/LI-Yixuan), [Zinan Lu](https://github.com/Jacobluke-) and [Rou Zhang](https://github.com/ZHANGROU-99).\n",
"\n",
"To find out more about the authors' research, please visit the [Claridge-Chang lab webpage](http://www.claridgechang.net/).\n",
"\n",
Expand Down Expand Up @@ -81,14 +83,6 @@
"POSSIBILITY OF SUCH DAMAGE.\n",
"</div>\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "de35a697",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
68 changes: 25 additions & 43 deletions nbs/API/dabest_object.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -805,18 +805,18 @@
{
"data": {
"text/plain": [
"DABEST v2023.03.29\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good afternoon!\n",
"The current time is Tue Apr 18 14:47:26 2023.\n",
"The current time is Tue Mar 19 15:33:25 2024.\n",
"\n",
"The unpaired mean difference between control and test is 0.5 [95%CI -0.0412, 1.0].\n",
"The p-value of the two-sided permutation t-test is 0.0758, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing theeffect size (or greater),\n",
"assuming the null hypothesis ofzero difference is true.\n",
"assuming the null hypothesis of zero difference is true.\n",
"For each p-value, 5000 reshuffles of the control and test labels were performed.\n",
"\n",
"To get the results of all valid statistical tests, use `.mean_diff.statistical_tests`"
Expand Down Expand Up @@ -865,31 +865,21 @@
"id": "8e9b8635",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/jacobluke/opt/anaconda3/envs/dabest-nbdev/lib/python3.8/site-packages/dabest/_stats_tools/effsize.py:72: UserWarning: Using median as the statistic in bootstrapping may result in a biased estimate and cause problems with BCa confidence intervals. Consider using a different statistic, such as the mean.\n",
"When plotting, please consider using percetile confidence intervals by specifying `ci_type='percentile'`. For detailed information, refer to https://github.com/ACCLAB/DABEST-python/issues/129 \n",
"\n",
" warnings.warn(message=mes1+mes2, category=UserWarning)\n"
]
},
{
"data": {
"text/plain": [
"DABEST v2023.03.29\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good afternoon!\n",
"The current time is Tue Apr 18 14:47:28 2023.\n",
"The current time is Tue Mar 19 15:33:26 2024.\n",
"\n",
"The unpaired median difference between control and test is 0.5 [95%CI -0.0758, 0.991].\n",
"The p-value of the two-sided permutation t-test is 0.103, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing theeffect size (or greater),\n",
"assuming the null hypothesis ofzero difference is true.\n",
"assuming the null hypothesis of zero difference is true.\n",
"For each p-value, 5000 reshuffles of the control and test labels were performed.\n",
"\n",
"To get the results of all valid statistical tests, use `.median_diff.statistical_tests`"
Expand Down Expand Up @@ -957,18 +947,18 @@
{
"data": {
"text/plain": [
"DABEST v2023.03.29\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good afternoon!\n",
"The current time is Tue Apr 18 14:47:29 2023.\n",
"The current time is Tue Mar 19 15:33:27 2024.\n",
"\n",
"The unpaired Cohen's d between control and test is 0.471 [95%CI -0.0843, 0.976].\n",
"The p-value of the two-sided permutation t-test is 0.0758, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing theeffect size (or greater),\n",
"assuming the null hypothesis ofzero difference is true.\n",
"assuming the null hypothesis of zero difference is true.\n",
"For each p-value, 5000 reshuffles of the control and test labels were performed.\n",
"\n",
"To get the results of all valid statistical tests, use `.cohens_d.statistical_tests`"
Expand Down Expand Up @@ -1051,18 +1041,18 @@
{
"data": {
"text/plain": [
"DABEST v2023.03.29\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good afternoon!\n",
"The current time is Tue Apr 18 14:47:30 2023.\n",
"The current time is Tue Mar 19 15:33:29 2024.\n",
"\n",
"The unpaired Cohen's h between control and test is 0.0 [95%CI -0.613, 0.429].\n",
"The p-value of the two-sided permutation t-test is 0.799, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing theeffect size (or greater),\n",
"assuming the null hypothesis ofzero difference is true.\n",
"assuming the null hypothesis of zero difference is true.\n",
"For each p-value, 5000 reshuffles of the control and test labels were performed.\n",
"\n",
"To get the results of all valid statistical tests, use `.cohens_h.statistical_tests`"
Expand Down Expand Up @@ -1126,18 +1116,18 @@
{
"data": {
"text/plain": [
"DABEST v2023.03.29\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good afternoon!\n",
"The current time is Tue Apr 18 14:47:32 2023.\n",
"The current time is Tue Mar 19 15:33:30 2024.\n",
"\n",
"The unpaired Hedges' g between control and test is 0.465 [95%CI -0.0832, 0.963].\n",
"The p-value of the two-sided permutation t-test is 0.0758, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing theeffect size (or greater),\n",
"assuming the null hypothesis ofzero difference is true.\n",
"assuming the null hypothesis of zero difference is true.\n",
"For each p-value, 5000 reshuffles of the control and test labels were performed.\n",
"\n",
"To get the results of all valid statistical tests, use `.hedges_g.statistical_tests`"
Expand Down Expand Up @@ -1200,18 +1190,18 @@
{
"data": {
"text/plain": [
"DABEST v2023.03.29\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good afternoon!\n",
"The current time is Tue Apr 18 14:47:40 2023.\n",
"The current time is Tue Mar 19 15:33:41 2024.\n",
"\n",
"The unpaired Cliff's delta between control and test is 0.28 [95%CI -0.0244, 0.533].\n",
"The p-value of the two-sided permutation t-test is 0.061, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing theeffect size (or greater),\n",
"assuming the null hypothesis ofzero difference is true.\n",
"assuming the null hypothesis of zero difference is true.\n",
"For each p-value, 5000 reshuffles of the control and test labels were performed.\n",
"\n",
"To get the results of all valid statistical tests, use `.cliffs_delta.statistical_tests`"
Expand Down Expand Up @@ -1271,20 +1261,20 @@
{
"data": {
"text/plain": [
"DABEST v2023.02.14\n",
"DABEST v2024.03.29\n",
"==================\n",
" \n",
"Good morning!\n",
"The current time is Tue May 16 01:11:14 2023.\n",
"Good afternoon!\n",
"The current time is Tue Mar 19 15:33:45 2024.\n",
"\n",
"The unpaired deltas' g between W Placebo and M Placebo is 0.793 [95%CI 0.553, 1.1].\n",
"The unpaired deltas' g between W Placebo and M Placebo is 1.74 [95%CI 1.1, 2.31].\n",
"The p-value of the two-sided permutation t-test is 0.0, calculated for legacy purposes only. \n",
"\n",
"The unpaired deltas' g between W Drug and M Drug is 0.528 [95%CI 0.286, 0.765].\n",
"The unpaired deltas' g between W Drug and M Drug is 1.33 [95%CI 0.611, 1.96].\n",
"The p-value of the two-sided permutation t-test is 0.0, calculated for legacy purposes only. \n",
"\n",
"The deltas' g between Placebo and Drug is -0.651 [95%CI -1.6, 0.217].\n",
"The p-value of the two-sided permutation t-test is 0.0, calculated for legacy purposes only. \n",
"The deltas' g between Placebo and Drug is -0.651 [95%CI -1.59, 0.165].\n",
"The p-value of the two-sided permutation t-test is 0.0694, calculated for legacy purposes only. \n",
"\n",
"5000 bootstrap samples were taken; the confidence interval is bias-corrected and accelerated.\n",
"Any p-value reported is the probability of observing the effect size (or greater),\n",
Expand Down Expand Up @@ -1360,14 +1350,6 @@
"\n",
"$\\Delta_{g} = \\frac{\\Delta_{\\Delta}}{s_{\\Delta_{\\Delta}}}$"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "07a84d5f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
19 changes: 13 additions & 6 deletions nbs/API/delta_objects.ipynb

Large diffs are not rendered by default.

0 comments on commit ff779d2

Please sign in to comment.