comparing statistical test in scipy.stats and R.stats, what do we have?
![](https://secure.gravatar.com/avatar/ad13088a623822caf74e635a68a55eae.jpg?s=120&d=mm&r=g)
I'm looking a bit at the status of "Statistics in Python", or "what do they have, and we don't". Here are raw tables of content of R.stats and scipy.stats for statistical tests. Some additional ones are in scikits.statsmodels, but several are missing. (It doesn't contain the latest additions to scipy.stats like fisherexact) Is anyone interested in adding some missing ones? (BSD compatible and hopefully verified or verifiable so that they don't have to linger for a year or two in the ticket queue) I will keep adding the ones I'm interested in to scikits.statsmodels. Josef from the scraped table of content of R library(stats) functions with "test" in name
pprint([item for item in statstoc if 'test' in item[0].lower()]) [['ansari.test', 'Ansari-Bradley Test '], ['bartlett.test', 'Bartlett Test of Homogeneity of Variances '], ['binom.test', 'Exact Binomial Test '], ['Box.test', 'Box-Pierce and Ljung-Box Tests '], ['chisq.test', "Pearson's Chi-squared Test for Count Data "], ['cor.test', 'Test for Association/Correlation Between Paired Samples '], ['fisher.test', "Fisher's Exact Test for Count Data "], ['fligner.test', 'Fligner-Killeen Test of Homogeneity of Variances '], ['friedman.test', 'Friedman Rank Sum Test '], ['kruskal.test', 'Kruskal-Wallis Rank Sum Test '], ['ks.test', 'Kolmogorov-Smirnov Tests '], ['mantelhaen.test', 'Cochran-Mantel-Haenszel Chi-Squared Test for Count Data '], ['mauchly.test', "Mauchly's Test of Sphericity "], ['mcnemar.test', "McNemar's Chi-squared Test for Count Data "], ['mood.test', 'Mood Two-Sample Test of Scale '], ['oneway.test', 'Test for Equal Means in a One-Way Layout '], ['pairwise.prop.test', 'Pairwise comparisons for proportions '], ['pairwise.t.test', 'Pairwise t tests '], ['pairwise.wilcox.test', 'Pairwise Wilcoxon rank sum tests '], ['poisson.test', 'Exact Poisson tests '], ['power.anova.test', 'Power calculations for balanced one-way analysis of variance tests '], ['power.prop.test', 'Power calculations two sample test for proportions '], ['power.t.test', 'Power calculations for one and two sample t tests '], ['PP.test', 'Phillips-Perron Test for Unit Roots '], ['print.power.htest', 'Print method for power calculation object '], ['prop.test', 'Test of Equal or Given Proportions '], ['prop.trend.test', 'Test for trend in proportions '], ['quade.test', 'Quade Test '], ['shapiro.test', 'Shapiro-Wilk Normality Test '], ['t.test', "Student's t-Test "], ['var.test', 'F Test to Compare Two Variances '], ['wilcox.test', 'Wilcoxon Rank Sum and Signed Rank Tests ']]
in scipy.stats objects with "test" in docs
[item for item in dir(stats) if (getattr(stats, item).__doc__ and 'test' in getattr(stats, item).__doc__)] ['Tester', 'anderson', 'ansari', 'bartlett', 'binom_test', 'chisquare', 'f_oneway', 'fligner', 'friedmanchisquare', 'glm', 'kendalltau', 'kruskal', 'ks_2samp', 'ksone', 'ksprob', 'kstest', 'kstwobign', 'kurtosis', 'kurtosistest', 'levene', 'linregress', 'mannwhitneyu', 'mood', 'normaltest', 'obrientransform', 'oneway', 'pearsonr', 'percentileofscore', 'ranksums', 'rv_discrete', 'shapiro', 'skew', 'skewtest', 'spearmanr', 'statlib', 'stats', 'test', 'tiecorrect', 'ttest_1samp', 'ttest_ind', 'ttest_rel', 'wilcoxon']
Josef
![](https://secure.gravatar.com/avatar/40489da22d2dc0cc12596420bb810463.jpg?s=120&d=mm&r=g)
It would be great to get these into scipy stats -- particularly the ones you are interested in :-) Travis -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Dec 8, 2010, at 8:33 AM, josef.pktd@gmail.com wrote:
I'm looking a bit at the status of "Statistics in Python", or "what do they have, and we don't".
Here are raw tables of content of R.stats and scipy.stats for statistical tests. Some additional ones are in scikits.statsmodels, but several are missing. (It doesn't contain the latest additions to scipy.stats like fisherexact)
Is anyone interested in adding some missing ones? (BSD compatible and hopefully verified or verifiable so that they don't have to linger for a year or two in the ticket queue)
I will keep adding the ones I'm interested in to scikits.statsmodels.
Josef
from the scraped table of content of R library(stats) functions with "test" in name
pprint([item for item in statstoc if 'test' in item[0].lower()]) [['ansari.test', 'Ansari-Bradley Test '], ['bartlett.test', 'Bartlett Test of Homogeneity of Variances '], ['binom.test', 'Exact Binomial Test '], ['Box.test', 'Box-Pierce and Ljung-Box Tests '], ['chisq.test', "Pearson's Chi-squared Test for Count Data "], ['cor.test', 'Test for Association/Correlation Between Paired Samples '], ['fisher.test', "Fisher's Exact Test for Count Data "], ['fligner.test', 'Fligner-Killeen Test of Homogeneity of Variances '], ['friedman.test', 'Friedman Rank Sum Test '], ['kruskal.test', 'Kruskal-Wallis Rank Sum Test '], ['ks.test', 'Kolmogorov-Smirnov Tests '], ['mantelhaen.test', 'Cochran-Mantel-Haenszel Chi-Squared Test for Count Data '], ['mauchly.test', "Mauchly's Test of Sphericity "], ['mcnemar.test', "McNemar's Chi-squared Test for Count Data "], ['mood.test', 'Mood Two-Sample Test of Scale '], ['oneway.test', 'Test for Equal Means in a One-Way Layout '], ['pairwise.prop.test', 'Pairwise comparisons for proportions '], ['pairwise.t.test', 'Pairwise t tests '], ['pairwise.wilcox.test', 'Pairwise Wilcoxon rank sum tests '], ['poisson.test', 'Exact Poisson tests '], ['power.anova.test', 'Power calculations for balanced one-way analysis of variance tests '], ['power.prop.test', 'Power calculations two sample test for proportions '], ['power.t.test', 'Power calculations for one and two sample t tests '], ['PP.test', 'Phillips-Perron Test for Unit Roots '], ['print.power.htest', 'Print method for power calculation object '], ['prop.test', 'Test of Equal or Given Proportions '], ['prop.trend.test', 'Test for trend in proportions '], ['quade.test', 'Quade Test '], ['shapiro.test', 'Shapiro-Wilk Normality Test '], ['t.test', "Student's t-Test "], ['var.test', 'F Test to Compare Two Variances '], ['wilcox.test', 'Wilcoxon Rank Sum and Signed Rank Tests ']]
in scipy.stats objects with "test" in docs
[item for item in dir(stats) if (getattr(stats, item).__doc__ and 'test' in getattr(stats, item).__doc__)] ['Tester', 'anderson', 'ansari', 'bartlett', 'binom_test', 'chisquare', 'f_oneway', 'fligner', 'friedmanchisquare', 'glm', 'kendalltau', 'kruskal', 'ks_2samp', 'ksone', 'ksprob', 'kstest', 'kstwobign', 'kurtosis', 'kurtosistest', 'levene', 'linregress', 'mannwhitneyu', 'mood', 'normaltest', 'obrientransform', 'oneway', 'pearsonr', 'percentileofscore', 'ranksums', 'rv_discrete', 'shapiro', 'skew', 'skewtest', 'spearmanr', 'statlib', 'stats', 'test', 'tiecorrect', 'ttest_1samp', 'ttest_ind', 'ttest_rel', 'wilcoxon']
Josef _______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/ad13088a623822caf74e635a68a55eae.jpg?s=120&d=mm&r=g)
On Wed, Dec 8, 2010 at 6:13 PM, Travis Oliphant <oliphant@enthought.com> wrote:
It would be great to get these into scipy stats -- particularly the ones you are interested in :-)
Right now, most of the tests that I'm working on are in support of regression models, especially diagnostic and specification tests, so they require statsmodels. Josef
Travis
-- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com
On Dec 8, 2010, at 8:33 AM, josef.pktd@gmail.com wrote:
I'm looking a bit at the status of "Statistics in Python", or "what do they have, and we don't".
Here are raw tables of content of R.stats and scipy.stats for statistical tests. Some additional ones are in scikits.statsmodels, but several are missing. (It doesn't contain the latest additions to scipy.stats like fisherexact)
Is anyone interested in adding some missing ones? (BSD compatible and hopefully verified or verifiable so that they don't have to linger for a year or two in the ticket queue)
I will keep adding the ones I'm interested in to scikits.statsmodels.
Josef
from the scraped table of content of R library(stats) functions with "test" in name
pprint([item for item in statstoc if 'test' in item[0].lower()]) [['ansari.test', 'Ansari-Bradley Test '], ['bartlett.test', 'Bartlett Test of Homogeneity of Variances '], ['binom.test', 'Exact Binomial Test '], ['Box.test', 'Box-Pierce and Ljung-Box Tests '], ['chisq.test', "Pearson's Chi-squared Test for Count Data "], ['cor.test', 'Test for Association/Correlation Between Paired Samples '], ['fisher.test', "Fisher's Exact Test for Count Data "], ['fligner.test', 'Fligner-Killeen Test of Homogeneity of Variances '], ['friedman.test', 'Friedman Rank Sum Test '], ['kruskal.test', 'Kruskal-Wallis Rank Sum Test '], ['ks.test', 'Kolmogorov-Smirnov Tests '], ['mantelhaen.test', 'Cochran-Mantel-Haenszel Chi-Squared Test for Count Data '], ['mauchly.test', "Mauchly's Test of Sphericity "], ['mcnemar.test', "McNemar's Chi-squared Test for Count Data "], ['mood.test', 'Mood Two-Sample Test of Scale '], ['oneway.test', 'Test for Equal Means in a One-Way Layout '], ['pairwise.prop.test', 'Pairwise comparisons for proportions '], ['pairwise.t.test', 'Pairwise t tests '], ['pairwise.wilcox.test', 'Pairwise Wilcoxon rank sum tests '], ['poisson.test', 'Exact Poisson tests '], ['power.anova.test', 'Power calculations for balanced one-way analysis of variance tests '], ['power.prop.test', 'Power calculations two sample test for proportions '], ['power.t.test', 'Power calculations for one and two sample t tests '], ['PP.test', 'Phillips-Perron Test for Unit Roots '], ['print.power.htest', 'Print method for power calculation object '], ['prop.test', 'Test of Equal or Given Proportions '], ['prop.trend.test', 'Test for trend in proportions '], ['quade.test', 'Quade Test '], ['shapiro.test', 'Shapiro-Wilk Normality Test '], ['t.test', "Student's t-Test "], ['var.test', 'F Test to Compare Two Variances '], ['wilcox.test', 'Wilcoxon Rank Sum and Signed Rank Tests ']]
in scipy.stats objects with "test" in docs
[item for item in dir(stats) if (getattr(stats, item).__doc__ and 'test' in getattr(stats, item).__doc__)] ['Tester', 'anderson', 'ansari', 'bartlett', 'binom_test', 'chisquare', 'f_oneway', 'fligner', 'friedmanchisquare', 'glm', 'kendalltau', 'kruskal', 'ks_2samp', 'ksone', 'ksprob', 'kstest', 'kstwobign', 'kurtosis', 'kurtosistest', 'levene', 'linregress', 'mannwhitneyu', 'mood', 'normaltest', 'obrientransform', 'oneway', 'pearsonr', 'percentileofscore', 'ranksums', 'rv_discrete', 'shapiro', 'skew', 'skewtest', 'spearmanr', 'statlib', 'stats', 'test', 'tiecorrect', 'ttest_1samp', 'ttest_ind', 'ttest_rel', 'wilcoxon']
Josef _______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
participants (2)
-
josef.pktd@gmail.com
-
Travis Oliphant