Beispiel #1
0
 def test_kendalltau_seasonal(self):
     # Tests the seasonal Kendall tau.
     x = [[nan,nan, 4, 2, 16, 26, 5, 1, 5, 1, 2, 3, 1],
          [4, 3, 5, 3, 2, 7, 3, 1, 1, 2, 3, 5, 3],
          [3, 2, 5, 6, 18, 4, 9, 1, 1,nan, 1, 1,nan],
          [nan, 6, 11, 4, 17,nan, 6, 1, 1, 2, 5, 1, 1]]
     x = ma.fix_invalid(x).T
     output = mstats.kendalltau_seasonal(x)
     assert_almost_equal(output['global p-value (indep)'], 0.008, 3)
     assert_almost_equal(output['seasonal p-value'].round(2),
                         [0.18,0.53,0.20,0.04])
Beispiel #2
0
 def test_kendalltau_seasonal(self):
     # Tests the seasonal Kendall tau.
     x = [[nan,nan, 4, 2, 16, 26, 5, 1, 5, 1, 2, 3, 1],
          [4, 3, 5, 3, 2, 7, 3, 1, 1, 2, 3, 5, 3],
          [3, 2, 5, 6, 18, 4, 9, 1, 1,nan, 1, 1,nan],
          [nan, 6, 11, 4, 17,nan, 6, 1, 1, 2, 5, 1, 1]]
     x = ma.fix_invalid(x).T
     output = mstats.kendalltau_seasonal(x)
     assert_almost_equal(output['global p-value (indep)'], 0.008, 3)
     assert_almost_equal(output['seasonal p-value'].round(2),
                         [0.18,0.53,0.20,0.04])