stats.tests.test_mstats_basic

Tests for the stats.mstats module (support for masked arrays)

Module Contents

Classes

TestMquantiles()
TestGMean()
TestHMean()
TestRanking()
TestCorr()
TestTrimming()
TestMoments()
TestPercentile()
TestVariability() Comparison numbers are found using R v.1.5.1
TestMisc()
TestNormalitytests()
TestFOneway()
TestMannwhitneyu()
TestKruskal()
TestTtest_rel()
TestTtest_ind()
TestTtest_1samp()
TestCompareWithStats() Class to compare mstats results with stats results.

Functions

test_regress_simple()
test_theilslopes()
test_plotting_positions()
class TestMquantiles
test_mquantiles_limit_keyword()
class TestGMean
test_1D()
test_1D_float96()
test_2D()
class TestHMean
test_1D()
test_1D_float96()
test_2D()
class TestRanking
test_ranking()
class TestCorr
test_pearsonr()
test_spearmanr()
test_kendalltau()
test_kendalltau_seasonal()
test_pointbiserial()
class TestTrimming
test_trim()
test_trim_old()
test_trimmedmean()
test_trimmed_stde()
test_winsorization()
class TestMoments
test_moment()
test_variation()
test_skewness()
test_kurtosis()
test_mode()
test_mode_modifies_input()
class TestPercentile
setup_method()
test_percentile()
test_2D()
class TestVariability

Comparison numbers are found using R v.1.5.1 note that length(testcase) = 4

test_sem()
test_zmap()
test_zscore()
class TestMisc
test_obrientransform()
test_kstwosamp()
test_friedmanchisq()
test_regress_simple()
test_theilslopes()
test_plotting_positions()
class TestNormalitytests
test_vs_nonmasked()
test_axis_None()
test_maskedarray_input()
test_nd_input()
test_normaltest_result_attributes()
test_kurtosistest_result_attributes()
class TestFOneway
test_result_attributes()
class TestMannwhitneyu
test_result_attributes()
class TestKruskal
test_result_attributes()
class TestTtest_rel
test_vs_nonmasked()
test_fully_masked()
test_result_attributes()
test_invalid_input_size()
test_empty()
test_zero_division()
class TestTtest_ind
test_vs_nonmasked()
test_fully_masked()
test_result_attributes()
test_empty()
test_zero_division()
class TestTtest_1samp
test_vs_nonmasked()
test_fully_masked()
test_result_attributes()
test_empty()
test_zero_division()
class TestCompareWithStats

Class to compare mstats results with stats results.

It is in general assumed that scipy.stats is at a more mature stage than stats.mstats. If a routine in mstats results in similar results like in scipy.stats, this is considered also as a proper validation of scipy.mstats routine.

Different sample sizes are used for testing, as some problems between stats and mstats are dependent on sample size.

Author: Alexander Loew

NOTE that some tests fail. This might be caused by a) actual differences or bugs between stats and mstats b) numerical inaccuracies c) different definitions of routine interfaces

These failures need to be checked. Current workaround is to have disabled these tests, but issuing reports on scipy-dev

get_n()

Returns list of sample sizes to be used for comparison.

generate_xy_sample(n)
generate_xy_sample2D(n, nx)
test_linregress()
test_pearsonr()
test_spearmanr()
test_gmean()
test_hmean()
test_skew()
test_moment()
test_zscore()
test_kurtosis()
test_sem()
test_describe()
test_describe_result_attributes()
test_rankdata()
test_tmean()
test_tmax()
test_tmin()
test_zmap()
test_variation()
test_tvar()
test_trimboth()
test_tsem()
test_skewtest()
test_skewtest_result_attributes()
test_skewtest_2D_notmasked()
test_skewtest_2D_WithMask()
test_normaltest()
test_find_repeats()
test_kendalltau()
test_obrientransform()