Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/n/i/nipy-0.3.0/nipy/algorithms/statistics/tests/test_mixed_effects.py   nipy(Download)
import numpy.random as nr
 
from ..mixed_effects_stat import (
    one_sample_ttest, one_sample_ftest, two_sample_ttest, two_sample_ftest, 
    generate_data, t_stat, mfx_stat)
    # compute the test statistics
    u = np.concatenate((np.ones(5), np.zeros(10)))
    t2 = two_sample_ttest(data, vardata, u, n_iter=5)
    assert t2.shape == (n_tests,)
    assert np.abs(t2.mean() < 5 / np.sqrt(n_tests))
    assert t2.var() < 2
    assert t2.var() > .5
 
    # try verbose mode
    t3 = two_sample_ttest(data, vardata, u, n_iter=5, verbose=1)