[pymvpa] How to average group-level permutation test in pyMVPA

Xiaobei Zhang xiaobeiz at usc.edu
Tue Apr 20 18:43:37 BST 2021


Hi all,
I am trying to do a group-level permutation test in pyMVPA. I have obtained
individual p-values with permutation test and I think I should average the
permuted distributions across subjects to get the p-value and mean
accuracy.
I am not sure what I should do next and here are the current lines I have:
sub=[2003,2016,2077,2098,2989,1989......]
for subject in sub:
............ #basic parameters
clf = LinearCSVMC()
permutator = AttributePermutator('targets', count=1000)
distr_est = MCNullDist(permutator, tail='left', enable_ca=['dist_samples'])
cvte = CrossValidation(clf,splitter,errorfx=mean_mismatch_error,
                     postproc=mean_sample(),
                     null_dist=distr_est,enable_ca=['stats'])
    err=cvte(dataset)
    cvte.null_dist.append(cvte.null_dist)
    p = cvte.ca.null_prob
    assert(p.shape == (1,1))
    print 'Corresponding p-value:',  np.asscalar(p)

Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-exppsy-pymvpa/attachments/20210420/ff3cb3cf/attachment.htm>


More information about the Pkg-ExpPsy-PyMVPA mailing list