AutoStatLib 0.2.16__tar.gz → 0.2.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of AutoStatLib might be problematic. Click here for more details.
- {autostatlib-0.2.16/src/AutoStatLib.egg-info → autostatlib-0.2.20}/PKG-INFO +24 -24
- {autostatlib-0.2.16 → autostatlib-0.2.20}/README.md +23 -23
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/AutoStatLib.py +28 -7
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/StatPlots.py +15 -12
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/_version.py +1 -1
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/helpers.py +11 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/statistical_tests.py +6 -6
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/text_formatting.py +1 -1
- {autostatlib-0.2.16 → autostatlib-0.2.20/src/AutoStatLib.egg-info}/PKG-INFO +24 -24
- {autostatlib-0.2.16 → autostatlib-0.2.20}/LICENSE +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/MANIFEST.in +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/pyproject.toml +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/requirements.txt +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/setup.cfg +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/__init__.py +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/__main__.py +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib/normality_tests.py +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib.egg-info/SOURCES.txt +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib.egg-info/dependency_links.txt +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib.egg-info/requires.txt +0 -0
- {autostatlib-0.2.16 → autostatlib-0.2.20}/src/AutoStatLib.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AutoStatLib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.20
|
|
4
4
|
Summary: AutoStatLib - a simple statistical analysis tool
|
|
5
5
|
Author: Stemonitis, SciWare LLC
|
|
6
6
|
Author-email: konung-yaropolk <yaropolk1995@gmail.com>
|
|
@@ -659,39 +659,39 @@ If errors occured, *GetResult()* returns an empty dictionary
|
|
|
659
659
|
|
|
660
660
|
---
|
|
661
661
|
|
|
662
|
-
##
|
|
662
|
+
## Alpha dev status.
|
|
663
663
|
|
|
664
664
|
### TODO:
|
|
665
665
|
|
|
666
|
-
-- Anova: posthocs
|
|
667
|
-
-- Anova: add 2-way anova and 3-way anova
|
|
668
|
-
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
|
|
669
|
-
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
|
|
670
|
-
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
|
|
671
|
-
-- add Welch test (for norm data unequal variances)
|
|
672
|
-
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
|
|
673
|
-
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
|
|
674
|
-
-- add correlation test, correlation diagram
|
|
675
|
-
-- add linear regression, regression diagram
|
|
676
|
-
-- add QQ plot
|
|
677
|
-
-- n-sample tests: add onetail option
|
|
666
|
+
-- Anova: posthocs
|
|
667
|
+
-- Anova: add 2-way anova and 3-way anova
|
|
668
|
+
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
|
|
669
|
+
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
|
|
670
|
+
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
|
|
671
|
+
-- add Welch test (for norm data unequal variances)
|
|
672
|
+
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
|
|
673
|
+
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
|
|
674
|
+
-- add correlation test, correlation diagram
|
|
675
|
+
-- add linear regression, regression diagram
|
|
676
|
+
-- add QQ plot
|
|
677
|
+
-- n-sample tests: add onetail option
|
|
678
678
|
|
|
679
679
|
✅ done -- detailed normality test results
|
|
680
680
|
✅ done -- added posthoc: Kruskal-Wallis Dunn's multiple comparisons
|
|
681
681
|
|
|
682
682
|
tests check:
|
|
683
683
|
1-sample:
|
|
684
|
-
--Wilcoxon 2,1 tails
|
|
685
|
-
--t-tests 2,1 tails
|
|
684
|
+
✅ok --Wilcoxon 2,1 tails
|
|
685
|
+
✅ok --t-tests 2,1 tails
|
|
686
686
|
|
|
687
687
|
2-sample:
|
|
688
|
-
--Wilcoxon 2,1 tails
|
|
689
|
-
--Mann-whitney 2,1 tails
|
|
690
|
-
--t-tests 2,1 tails
|
|
688
|
+
✅ok --Wilcoxon 2,1 tails
|
|
689
|
+
✅ok --Mann-whitney 2,1 tails
|
|
690
|
+
✅ok --t-tests 2,1 tails
|
|
691
691
|
|
|
692
692
|
n-sample:
|
|
693
|
-
--Kruskal-Wallis 2 tail
|
|
694
|
-
--Dunn's multiple comparisons
|
|
695
|
-
--Friedman 2 tail
|
|
696
|
-
--one-way
|
|
697
|
-
--Tukey`s multiple comparisons
|
|
693
|
+
✅ok --Kruskal-Wallis 2 tail
|
|
694
|
+
✅ok --Dunn's multiple comparisons
|
|
695
|
+
✅ok --Friedman 2 tail
|
|
696
|
+
✅ok --one-way ANOVA 2-tailed
|
|
697
|
+
✅ok --Tukey`s multiple comparisons
|
|
@@ -119,39 +119,39 @@ If errors occured, *GetResult()* returns an empty dictionary
|
|
|
119
119
|
|
|
120
120
|
---
|
|
121
121
|
|
|
122
|
-
##
|
|
122
|
+
## Alpha dev status.
|
|
123
123
|
|
|
124
124
|
### TODO:
|
|
125
125
|
|
|
126
|
-
-- Anova: posthocs
|
|
127
|
-
-- Anova: add 2-way anova and 3-way anova
|
|
128
|
-
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
|
|
129
|
-
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
|
|
130
|
-
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
|
|
131
|
-
-- add Welch test (for norm data unequal variances)
|
|
132
|
-
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
|
|
133
|
-
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
|
|
134
|
-
-- add correlation test, correlation diagram
|
|
135
|
-
-- add linear regression, regression diagram
|
|
136
|
-
-- add QQ plot
|
|
137
|
-
-- n-sample tests: add onetail option
|
|
126
|
+
-- Anova: posthocs
|
|
127
|
+
-- Anova: add 2-way anova and 3-way anova
|
|
128
|
+
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
|
|
129
|
+
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
|
|
130
|
+
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
|
|
131
|
+
-- add Welch test (for norm data unequal variances)
|
|
132
|
+
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
|
|
133
|
+
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
|
|
134
|
+
-- add correlation test, correlation diagram
|
|
135
|
+
-- add linear regression, regression diagram
|
|
136
|
+
-- add QQ plot
|
|
137
|
+
-- n-sample tests: add onetail option
|
|
138
138
|
|
|
139
139
|
✅ done -- detailed normality test results
|
|
140
140
|
✅ done -- added posthoc: Kruskal-Wallis Dunn's multiple comparisons
|
|
141
141
|
|
|
142
142
|
tests check:
|
|
143
143
|
1-sample:
|
|
144
|
-
--Wilcoxon 2,1 tails
|
|
145
|
-
--t-tests 2,1 tails
|
|
144
|
+
✅ok --Wilcoxon 2,1 tails
|
|
145
|
+
✅ok --t-tests 2,1 tails
|
|
146
146
|
|
|
147
147
|
2-sample:
|
|
148
|
-
--Wilcoxon 2,1 tails
|
|
149
|
-
--Mann-whitney 2,1 tails
|
|
150
|
-
--t-tests 2,1 tails
|
|
148
|
+
✅ok --Wilcoxon 2,1 tails
|
|
149
|
+
✅ok --Mann-whitney 2,1 tails
|
|
150
|
+
✅ok --t-tests 2,1 tails
|
|
151
151
|
|
|
152
152
|
n-sample:
|
|
153
|
-
--Kruskal-Wallis 2 tail
|
|
154
|
-
--Dunn's multiple comparisons
|
|
155
|
-
--Friedman 2 tail
|
|
156
|
-
--one-way
|
|
157
|
-
--Tukey`s multiple comparisons
|
|
153
|
+
✅ok --Kruskal-Wallis 2 tail
|
|
154
|
+
✅ok --Dunn's multiple comparisons
|
|
155
|
+
✅ok --Friedman 2 tail
|
|
156
|
+
✅ok --one-way ANOVA 2-tailed
|
|
157
|
+
✅ok --Tukey`s multiple comparisons
|
|
@@ -18,7 +18,8 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
18
18
|
tails=2,
|
|
19
19
|
popmean=None,
|
|
20
20
|
posthoc=False,
|
|
21
|
-
verbose=True
|
|
21
|
+
verbose=True,
|
|
22
|
+
groups_name=[]):
|
|
22
23
|
self.results = None
|
|
23
24
|
self.error = False
|
|
24
25
|
self.groups_list = groups_list
|
|
@@ -28,9 +29,28 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
28
29
|
self.posthoc = posthoc
|
|
29
30
|
self.verbose = verbose
|
|
30
31
|
self.n_groups = len(self.groups_list)
|
|
32
|
+
self.groups_name = [groups_name[i % len(groups_name)]
|
|
33
|
+
for i in range(self.n_groups)] if groups_name else [f'Group {i+1}'
|
|
34
|
+
for i in range(self.n_groups)]
|
|
35
|
+
|
|
31
36
|
self.warning_flag_non_numeric_data = False
|
|
32
37
|
self.summary = 'AutoStatLib v{}'.format(__version__)
|
|
33
38
|
|
|
39
|
+
# empties
|
|
40
|
+
self.results = None
|
|
41
|
+
self.error = False
|
|
42
|
+
self.warnings = []
|
|
43
|
+
self.normals = []
|
|
44
|
+
self.test_name = ''
|
|
45
|
+
self.test_id = None
|
|
46
|
+
self.test_stat = None
|
|
47
|
+
self.p_value = None
|
|
48
|
+
self.posthoc_matrix_df = None
|
|
49
|
+
self.posthoc_matrix = []
|
|
50
|
+
self.posthoc_name = ''
|
|
51
|
+
self.data = []
|
|
52
|
+
self.parametric = None
|
|
53
|
+
|
|
34
54
|
# test IDs classification:
|
|
35
55
|
self.test_ids_all = [ # in aplhabetical order
|
|
36
56
|
'anova_1w_ordinary',
|
|
@@ -80,6 +100,7 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
80
100
|
'no_pop_mean_set': '\nWarning: No Population Mean was set up for single-sample test, used default 0 value.\n The results might be skewed. \n Please, set the Population Mean and run the test again.\n',
|
|
81
101
|
}
|
|
82
102
|
|
|
103
|
+
|
|
83
104
|
def run_test(self, test='auto'):
|
|
84
105
|
|
|
85
106
|
# reset values from previous tests
|
|
@@ -108,7 +129,7 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
108
129
|
# delete the empty cols from input
|
|
109
130
|
self.data = [col for col in self.data if any(
|
|
110
131
|
x is not None for x in col)]
|
|
111
|
-
|
|
132
|
+
|
|
112
133
|
# User input assertion block
|
|
113
134
|
try:
|
|
114
135
|
assert self.data, 'There is no input data'
|
|
@@ -116,7 +137,7 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
116
137
|
assert test in self.test_ids_all or test == 'auto', 'Wrong test id choosen, ensure you called correct function'
|
|
117
138
|
assert all(len(
|
|
118
139
|
group) >= 4 for group in self.data), 'Each group must contain at least four values'
|
|
119
|
-
assert not (self.paired
|
|
140
|
+
assert not (self.paired is True
|
|
120
141
|
and not all(len(lst) == len(self.data[0]) for lst in self.data)), 'Paired groups must have the same length'
|
|
121
142
|
assert not (test in self.test_ids_dependent
|
|
122
143
|
and not all(len(lst) == len(self.data[0]) for lst in self.data)), 'Groups must have the same length for dependent groups test'
|
|
@@ -153,7 +174,7 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
153
174
|
'+' if x is True else '-' if x is False else ' ' if x is None else 'e' for x in poll)
|
|
154
175
|
self.normals.append(isnormal)
|
|
155
176
|
self.log(
|
|
156
|
-
f'
|
|
177
|
+
f' {self.groups_name[i].ljust(7, ' ')[:7]}: {poll_print[0]} {poll_print[1]} {poll_print[2]} {poll_print[3]} so disrtibution seems {"normal" if isnormal else "not normal"}')
|
|
157
178
|
self.parametric = all(self.normals)
|
|
158
179
|
|
|
159
180
|
# print test choosen
|
|
@@ -164,9 +185,9 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
164
185
|
self.log('Test chosen by user: ', test)
|
|
165
186
|
|
|
166
187
|
# Wrong test Warnings
|
|
167
|
-
if
|
|
188
|
+
if test != 'auto' and not self.parametric and test in self.test_ids_parametric:
|
|
168
189
|
self.AddWarning('param_test_with_non-normal_data')
|
|
169
|
-
if
|
|
190
|
+
if test != 'auto' and self.parametric and test not in self.test_ids_parametric:
|
|
170
191
|
self.AddWarning('non-param_test_with_normal_data')
|
|
171
192
|
|
|
172
193
|
# run the test
|
|
@@ -184,7 +205,7 @@ class StatisticalAnalysis(StatisticalTests, NormalityTests, TextFormatting, Help
|
|
|
184
205
|
self.log('-'*67 + '\n')
|
|
185
206
|
|
|
186
207
|
# print the results to console:
|
|
187
|
-
if self.verbose
|
|
208
|
+
if self.verbose is True:
|
|
188
209
|
print(self.summary)
|
|
189
210
|
|
|
190
211
|
# public methods:
|
|
@@ -82,7 +82,7 @@ class BaseStatPlot(Helpers):
|
|
|
82
82
|
x_label='',
|
|
83
83
|
y_label='',
|
|
84
84
|
print_x_labels=True,
|
|
85
|
-
|
|
85
|
+
Groups_Name=None,
|
|
86
86
|
Posthoc_Matrix=[],
|
|
87
87
|
Posthoc_Tests_Name='',
|
|
88
88
|
colormap=None,
|
|
@@ -125,7 +125,7 @@ class BaseStatPlot(Helpers):
|
|
|
125
125
|
self.p_printed = self.make_p_value_printed(self.p)
|
|
126
126
|
self.stars_printed = self.make_stars_printed(self.make_stars(self.p))
|
|
127
127
|
|
|
128
|
-
self.
|
|
128
|
+
self.groups_name = Groups_Name if Groups_Name is not None else [
|
|
129
129
|
'']
|
|
130
130
|
|
|
131
131
|
if colormap is not None and colormap != ['']:
|
|
@@ -341,7 +341,7 @@ class BaseStatPlot(Helpers):
|
|
|
341
341
|
marker='o',
|
|
342
342
|
markersize=8,
|
|
343
343
|
linewidth=1.2,
|
|
344
|
-
zorder=
|
|
344
|
+
zorder=2):
|
|
345
345
|
# Generate x jitter pool.
|
|
346
346
|
spread_pool = [] # storing x positions of data points
|
|
347
347
|
for i, data in enumerate(self.data_groups):
|
|
@@ -358,15 +358,15 @@ class BaseStatPlot(Helpers):
|
|
|
358
358
|
linewidth=linewidth*self.figure_scale_factor,
|
|
359
359
|
# Connect the data points if desired.
|
|
360
360
|
linestyle='-' if self.dependent else '',
|
|
361
|
-
zorder=zorder)
|
|
361
|
+
zorder=zorder-1)
|
|
362
362
|
|
|
363
363
|
def add_swarm(self, ax,
|
|
364
|
-
color='
|
|
364
|
+
color='dimgrey',
|
|
365
365
|
alpha=1,
|
|
366
366
|
marker='o',
|
|
367
367
|
markersize=8,
|
|
368
368
|
linewidth=1.4,
|
|
369
|
-
zorder=
|
|
369
|
+
zorder=2):
|
|
370
370
|
"""
|
|
371
371
|
Add a swarmplot (scatter-like plot with non-overlapping points)
|
|
372
372
|
to the provided Axes. Automatically reduce point size if overcrowded.
|
|
@@ -408,7 +408,7 @@ class BaseStatPlot(Helpers):
|
|
|
408
408
|
for i, data in enumerate(self.transpose(self.data_groups)):
|
|
409
409
|
ax.plot(range(len(data)), data,
|
|
410
410
|
color=color,
|
|
411
|
-
alpha=alpha * 0.
|
|
411
|
+
alpha=alpha * 0.25,
|
|
412
412
|
linewidth=linewidth * self.figure_scale_factor,
|
|
413
413
|
zorder=zorder - 1)
|
|
414
414
|
|
|
@@ -569,10 +569,10 @@ class BaseStatPlot(Helpers):
|
|
|
569
569
|
# Set x ticks and labels
|
|
570
570
|
if self.print_x_labels:
|
|
571
571
|
plt.subplots_adjust(bottom=0.11)
|
|
572
|
-
if self.
|
|
572
|
+
if self.groups_name != ['']:
|
|
573
573
|
ax.set_xticks(range(self.n_groups))
|
|
574
|
-
ax.set_xticklabels([self.
|
|
575
|
-
for i in range(self.n_groups)])
|
|
574
|
+
ax.set_xticklabels([self.groups_name[i % len(self.groups_name)]
|
|
575
|
+
for i in range(self.n_groups)], fontweight='regular', fontsize=8*self.figure_scale_factor)
|
|
576
576
|
else:
|
|
577
577
|
ax.set_xticks(range(self.n_groups))
|
|
578
578
|
ax.set_xticklabels(['Group {}'.format(i + 1)
|
|
@@ -680,6 +680,9 @@ class ViolinStatPlot(BaseStatPlot):
|
|
|
680
680
|
self.add_titles_and_labels(fig, ax)
|
|
681
681
|
self.axes_formatting(ax, linewidth)
|
|
682
682
|
|
|
683
|
+
xmin, xmax = ax.get_xlim()
|
|
684
|
+
ax.set_xlim(xmin - 0.3, xmax + 0.3)
|
|
685
|
+
|
|
683
686
|
|
|
684
687
|
class BoxStatPlot(BaseStatPlot):
|
|
685
688
|
|
|
@@ -713,7 +716,7 @@ class ScatterStatPlot(BaseStatPlot):
|
|
|
713
716
|
self.axes_formatting(ax, linewidth)
|
|
714
717
|
|
|
715
718
|
xmin, xmax = ax.get_xlim()
|
|
716
|
-
ax.set_xlim(xmin - 0.
|
|
719
|
+
ax.set_xlim(xmin - 0.3, xmax + 0.3)
|
|
717
720
|
|
|
718
721
|
|
|
719
722
|
class SwarmStatPlot(BaseStatPlot):
|
|
@@ -735,4 +738,4 @@ class SwarmStatPlot(BaseStatPlot):
|
|
|
735
738
|
self.axes_formatting(ax, linewidth)
|
|
736
739
|
|
|
737
740
|
xmin, xmax = ax.get_xlim()
|
|
738
|
-
ax.set_xlim(xmin - 0.
|
|
741
|
+
ax.set_xlim(xmin - 0.3, xmax + 0.3)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# AutoStatLib package version:
|
|
2
|
-
__version__ = "0.2.
|
|
2
|
+
__version__ = "0.2.20"
|
|
@@ -21,6 +21,16 @@ class Helpers():
|
|
|
21
21
|
{'Row': rows, 'Col': cols, 'Value': data})
|
|
22
22
|
return df
|
|
23
23
|
|
|
24
|
+
def list_to_matrix(self, list, n):
|
|
25
|
+
i = 0
|
|
26
|
+
matrix = [[1.0 for _ in range(n)] for _ in range(n)]
|
|
27
|
+
for ax0 in range(n):
|
|
28
|
+
for ax1 in range(ax0+1, n):
|
|
29
|
+
matrix[ax0][ax1] = list[i]
|
|
30
|
+
matrix[ax1][ax0] = list[i]
|
|
31
|
+
i += 1
|
|
32
|
+
return matrix
|
|
33
|
+
|
|
24
34
|
def floatify_recursive(self, data):
|
|
25
35
|
if isinstance(data, list):
|
|
26
36
|
# Recursively process sublists and filter out None values
|
|
@@ -55,6 +65,7 @@ class Helpers():
|
|
|
55
65
|
'Stars': self.stars_int,
|
|
56
66
|
# 'Stat_Value': self.test_stat.item(),
|
|
57
67
|
'Warnings': self.warnings,
|
|
68
|
+
'Groups_Name': self.groups_name,
|
|
58
69
|
'Groups_N': [len(self.data[i]) for i in range(len(self.data))],
|
|
59
70
|
'Groups_Median': [np.median(self.data[i]).item() for i in range(len(self.data))],
|
|
60
71
|
'Groups_Mean': [np.mean(self.data[i]).item() for i in range(len(self.data))],
|
|
@@ -99,12 +99,12 @@ class StatisticalTests():
|
|
|
99
99
|
[[f"Group_{i+1}"] * len(group) for i, group in enumerate(self.data)])
|
|
100
100
|
# Tukey's multiple comparisons
|
|
101
101
|
tukey_result = pairwise_tukeyhsd(data_flat, group_labels)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
|
|
103
|
+
list = tukey_result.pvalues.tolist()
|
|
104
|
+
n = self.n_groups
|
|
105
|
+
# prepare posthoc matrix
|
|
106
|
+
self.posthoc_matrix = self.list_to_matrix(list, n)
|
|
107
|
+
|
|
108
108
|
return stat, p_value
|
|
109
109
|
|
|
110
110
|
def anova_1w_rm(self):
|
|
@@ -22,7 +22,7 @@ class TextFormatting():
|
|
|
22
22
|
group_longest = max(len(row) for row in data)
|
|
23
23
|
|
|
24
24
|
# Print the header
|
|
25
|
-
header =
|
|
25
|
+
header = self.groups_name
|
|
26
26
|
line = [''*7]
|
|
27
27
|
self.log(self.autospace(header, space))
|
|
28
28
|
self.log(self.autospace(line, space))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AutoStatLib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.20
|
|
4
4
|
Summary: AutoStatLib - a simple statistical analysis tool
|
|
5
5
|
Author: Stemonitis, SciWare LLC
|
|
6
6
|
Author-email: konung-yaropolk <yaropolk1995@gmail.com>
|
|
@@ -659,39 +659,39 @@ If errors occured, *GetResult()* returns an empty dictionary
|
|
|
659
659
|
|
|
660
660
|
---
|
|
661
661
|
|
|
662
|
-
##
|
|
662
|
+
## Alpha dev status.
|
|
663
663
|
|
|
664
664
|
### TODO:
|
|
665
665
|
|
|
666
|
-
-- Anova: posthocs
|
|
667
|
-
-- Anova: add 2-way anova and 3-way anova
|
|
668
|
-
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
|
|
669
|
-
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
|
|
670
|
-
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
|
|
671
|
-
-- add Welch test (for norm data unequal variances)
|
|
672
|
-
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
|
|
673
|
-
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
|
|
674
|
-
-- add correlation test, correlation diagram
|
|
675
|
-
-- add linear regression, regression diagram
|
|
676
|
-
-- add QQ plot
|
|
677
|
-
-- n-sample tests: add onetail option
|
|
666
|
+
-- Anova: posthocs
|
|
667
|
+
-- Anova: add 2-way anova and 3-way anova
|
|
668
|
+
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
|
|
669
|
+
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
|
|
670
|
+
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
|
|
671
|
+
-- add Welch test (for norm data unequal variances)
|
|
672
|
+
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
|
|
673
|
+
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
|
|
674
|
+
-- add correlation test, correlation diagram
|
|
675
|
+
-- add linear regression, regression diagram
|
|
676
|
+
-- add QQ plot
|
|
677
|
+
-- n-sample tests: add onetail option
|
|
678
678
|
|
|
679
679
|
✅ done -- detailed normality test results
|
|
680
680
|
✅ done -- added posthoc: Kruskal-Wallis Dunn's multiple comparisons
|
|
681
681
|
|
|
682
682
|
tests check:
|
|
683
683
|
1-sample:
|
|
684
|
-
--Wilcoxon 2,1 tails
|
|
685
|
-
--t-tests 2,1 tails
|
|
684
|
+
✅ok --Wilcoxon 2,1 tails
|
|
685
|
+
✅ok --t-tests 2,1 tails
|
|
686
686
|
|
|
687
687
|
2-sample:
|
|
688
|
-
--Wilcoxon 2,1 tails
|
|
689
|
-
--Mann-whitney 2,1 tails
|
|
690
|
-
--t-tests 2,1 tails
|
|
688
|
+
✅ok --Wilcoxon 2,1 tails
|
|
689
|
+
✅ok --Mann-whitney 2,1 tails
|
|
690
|
+
✅ok --t-tests 2,1 tails
|
|
691
691
|
|
|
692
692
|
n-sample:
|
|
693
|
-
--Kruskal-Wallis 2 tail
|
|
694
|
-
--Dunn's multiple comparisons
|
|
695
|
-
--Friedman 2 tail
|
|
696
|
-
--one-way
|
|
697
|
-
--Tukey`s multiple comparisons
|
|
693
|
+
✅ok --Kruskal-Wallis 2 tail
|
|
694
|
+
✅ok --Dunn's multiple comparisons
|
|
695
|
+
✅ok --Friedman 2 tail
|
|
696
|
+
✅ok --one-way ANOVA 2-tailed
|
|
697
|
+
✅ok --Tukey`s multiple comparisons
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|