You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.cliffs_delta="The data is paired; Cliff's delta is therefore undefined."
204
+
self.__cliffs_delta="The data is paired; Cliff's delta is therefore undefined."
204
205
205
206
206
207
def__repr__(self):
@@ -247,6 +248,205 @@ def __repr__(self):
247
248
# @property
248
249
# def variable_name(self):
249
250
# return self.__variable_name()
251
+
252
+
@property
253
+
defmean_diff(self):
254
+
"""
255
+
Returns an :py:class:`EffectSizeDataFrame` for the mean difference, its confidence interval, and relevant statistics, for all comparisons as indicated via the `idx` and `paired` argument in `dabest.load()`.
256
+
257
+
Example
258
+
-------
259
+
>>> from scipy.stats import norm
260
+
>>> import pandas as pd
261
+
>>> import dabest
262
+
>>> control = norm.rvs(loc=0, size=30, random_state=12345)
263
+
>>> test = norm.rvs(loc=0.5, size=30, random_state=12345)
where :math:`\\overline{x}` is the mean for the group :math:`x`.
278
+
"""
279
+
returnself.__mean_diff
280
+
281
+
282
+
@property
283
+
defmedian_diff(self):
284
+
"""
285
+
Returns an :py:class:`EffectSizeDataFrame` for the median difference, its confidence interval, and relevant statistics, for all comparisons as indicated via the `idx` and `paired` argument in `dabest.load()`.
286
+
287
+
Example
288
+
-------
289
+
>>> from scipy.stats import norm
290
+
>>> import pandas as pd
291
+
>>> import dabest
292
+
>>> control = norm.rvs(loc=0, size=30, random_state=12345)
293
+
>>> test = norm.rvs(loc=0.5, size=30, random_state=12345)
where :math:`\\widetilde{x}` is the median for the group :math:`x`.
308
+
"""
309
+
returnself.__median_diff
310
+
311
+
312
+
@property
313
+
defcohens_d(self):
314
+
"""
315
+
Returns an :py:class:`EffectSizeDataFrame` for the standardized mean difference Cohen's `d`, its confidence interval, and relevant statistics, for all comparisons as indicated via the `idx` and `paired` argument in `dabest.load()`.
316
+
317
+
Example
318
+
-------
319
+
>>> from scipy.stats import norm
320
+
>>> import pandas as pd
321
+
>>> import dabest
322
+
>>> control = norm.rvs(loc=0, size=30, random_state=12345)
323
+
>>> test = norm.rvs(loc=0.5, size=30, random_state=12345)
Returns an :py:class:`EffectSizeDataFrame` for the standardized mean difference Hedges' `g`, its confidence interval, and relevant statistics, for all comparisons as indicated via the `idx` and `paired` argument in `dabest.load()`.
374
+
375
+
376
+
Example
377
+
-------
378
+
>>> from scipy.stats import norm
379
+
>>> import pandas as pd
380
+
>>> import dabest
381
+
>>> control = norm.rvs(loc=0, size=30, random_state=12345)
382
+
>>> test = norm.rvs(loc=0.5, size=30, random_state=12345)
Returns an :py:class:`EffectSizeDataFrame` for Cliff's delta, its confidence interval, and relevant statistics, for all comparisons as indicated via the `idx` and `paired` argument in `dabest.load()`.
416
+
417
+
418
+
Example
419
+
-------
420
+
>>> from scipy.stats import norm
421
+
>>> import pandas as pd
422
+
>>> import dabest
423
+
>>> control = norm.rvs(loc=0, size=30, random_state=12345)
424
+
>>> test = norm.rvs(loc=0.5, size=30, random_state=12345)
where :math:`\\#` denotes the number of times a value from the test sample exceeds (or is lesser than) values in the control sample.
441
+
442
+
Cliff's delta ranges from -1 to 1; it can also be thought of as a measure of the degree of overlap between the two samples. An attractive aspect of this effect size is that it does not make an assumptions about the underlying distributions that the samples were drawn from.
Returns the ic column declared to `dabest.load()`.
476
+
Returns the id column declared to `dabest.load()`.
277
477
"""
278
478
returnself.__id_col
279
479
@@ -1294,7 +1494,6 @@ def __calc_lqrt(self):
1294
1494
self.__lqrt_results=pd.DataFrame(out)
1295
1495
1296
1496
1297
-
1298
1497
defplot(self, color_col=None,
1299
1498
1300
1499
raw_marker_size=6, es_marker_size=9,
@@ -1582,7 +1781,11 @@ def dabest_obj(self):
1582
1781
1583
1782
@property
1584
1783
deflqrt(self):
1585
-
"""Returns all pairwise Lq-Likelihood Ratio Type test results nicely."""
1784
+
"""Returns all pairwise Lq-Likelihood Ratio Type test results
1785
+
as a pandas DataFrame.
1786
+
1787
+
For more information on LqRT tests, see https://arxiv.org/abs/1911.11922
1788
+
"""
1586
1789
try:
1587
1790
returnself.__lqrt_results
1588
1791
exceptAttributeError:
@@ -1622,6 +1825,21 @@ class PermutationTest:
1622
1825
1623
1826
effect_size : string
1624
1827
The type of effect size reported.
1828
+
1829
+
1830
+
Notes
1831
+
-----
1832
+
The basic concept of permutation tests is the same as that behind bootstrapping.
1833
+
In an "exact" permutation test, all possible resuffles of the control and test
1834
+
labels are performed, and the proportion of effect sizes that equal or exceed
1835
+
the observed effect size is computed. This is the probability, under the null
1836
+
hypothesis of zero difference between test and control groups, of observing the
1837
+
effect size: the p-value of the Student's t-test.
1838
+
1839
+
Exact permutation tests are impractical: computing the effect sizes for all reshuffles quickly exceeds trivial computational loads. A control group and a test group both with 10 observations each would have a total of :math:`20!` or :math:`2.43 \\times {10}^{18}` reshuffles.
1840
+
Therefore, in practice, "approximate" permutation tests are performed, where a sufficient number of reshuffles are performed (5,000 or 10,000), from which the p-value is computed.
1841
+
1842
+
More information can be found `here <https://en.wikipedia.org/wiki/Resampling_(statistics)#Permutation_tests>`_.
1625
1843
1626
1844
1627
1845
Example
@@ -1635,7 +1853,6 @@ class PermutationTest:
1635
1853
... effect_size="mean_diff",
1636
1854
... is_paired=False)
1637
1855
>>> perm_test
1638
-
1639
1856
5000 permutations were taken. The pvalue is 0.0758.
0 commit comments