예제 #1
0
파일: test_ibma.py 프로젝트: puckr/NiMARE
def test_weighted_stouffers():
    """
    Smoke test for Weighted Stouffer's.
    """
    result = ibma.stouffers(pytest.z_data, pytest.mask_img,
                            inference='rfx', null='theoretical', n_iters=None)
    assert isinstance(result, nimare.base.meta.MetaResult)
예제 #2
0
파일: test_ibma.py 프로젝트: puckr/NiMARE
def test_z_perm():
    """
    Smoke test for z permutation.
    """
    result = ibma.stouffers(pytest.z_data, pytest.mask_img,
                            inference='rfx', null='empirical', n_iters=10,
                            corr='FDR')
    assert isinstance(result, nimare.base.meta.MetaResult)
예제 #3
0
###############################################################################
# Fisher's
# --------------------------------------------------
result = fishers(z_data, mask_img)
plot_stat_map(result.images['z'],
              cut_coords=[0, 0, -8],
              draw_cross=False,
              cmap='RdBu_r')

###############################################################################
# Stouffer's with fixed-effects inference
# --------------------------------------------------
result = stouffers(z_data,
                   mask_img,
                   inference='ffx',
                   null='theoretical',
                   n_iters=None)
plot_stat_map(result.images['z'],
              cut_coords=[0, 0, -8],
              draw_cross=False,
              cmap='RdBu_r')

###############################################################################
# Stouffer's with random-effects inference using theoretical null distribution
# -----------------------------------------------------------------------------
result = stouffers(z_data,
                   mask_img,
                   inference='rfx',
                   null='theoretical',
                   n_iters=None)
예제 #4
0
    for i, t_data in enumerate(t_data_list)
]
tz_data = np.vstack(tz_data_list)

# Combine
z_data = np.vstack((z_data, tz_data))

# Fisher's
result1 = fishers(z_data, mask_img)
result1.save_results(output_dir='results/', prefix='fishers')

# Stouffer's
# Fixed-effects inference
result2 = stouffers(z_data,
                    mask_img,
                    inference='ffx',
                    null='theoretical',
                    n_iters=None)
result2.save_results(output_dir='results/', prefix='stouffers_ffx')

# Random-effects inference with theoretical null
result3 = stouffers(z_data,
                    mask_img,
                    inference='rfx',
                    null='theoretical',
                    n_iters=None)
result3.save_results(output_dir='results/', prefix='stouffers_rfx')

# Random-effects inference with empirical null
# Do not use FWE with empirical null
result4 = stouffers(z_data,