Skip to content

Commit

Permalink
Merge pull request #406 from bthirion/fix_mfx_doctest
Browse files Browse the repository at this point in the history
MRG: fixed failing doctest

Remove the cases where the simulated effects are 0: In these cases, due to the constraint in l.376, the mfx test can be more variable then the classical Student alternative, leading to a failure of the docstring test.
  • Loading branch information
matthew-brett committed Aug 11, 2016
2 parents f8d3149 + 32cb61e commit ed50475
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nipy/algorithms/statistics/mixed_effects_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
>>> N, P = 15, 500
>>> V1 = np.random.randn(N, P) ** 2
>>> effects = np.random.randn(P) > 0
>>> effects = np.ones(P)
>>> Y = generate_data(np.ones(N), effects, .25, V1)
>>> T1 = one_sample_ttest(Y, V1, n_iter=5)
>>> T1 = [T1[effects == x] for x in np.unique(effects)]
>>> T2 = [t_stat(Y)[effects == x] for x in np.unique(effects)]
>>> assert np.array([t1.std() < t2.std() for t1, t2 in zip(T1, T2)]).all()
>>> T2 = t_stat(Y)
>>> assert(T1.std() < T2.std())
"""
from __future__ import absolute_import
from __future__ import print_function
Expand Down

0 comments on commit ed50475

Please sign in to comment.