[pymvpa] outputting p-values from searchlight

Nick Oosterhof n.n.oosterhof at googlemail.com
Fri May 19 14:04:26 UTC 2017


> On 19 May 2017, at 15:58, William Graves <william.wyatt.graves at gmail.com> wrote:
> 
> Dear PyMVPA Experts:
> 
> In trying to do an RSA analysis using PyMVPA, I have to say your tools are really great. One issue I’ve run into though is that I can’t figure out from your documentation how to output both correlation coefficients and p-values into a NIfTI file to view the output.
> 
> Here’s what I’ve done so far:
> 
> Set up a comparison matrix for eventually testing against each searchlight:
> tdm = rsa.pdist(ds.sa.orth, 'correlation’)
> 
> Set up the target similarity comparison:
> dsm = rsa.PDistTargetSimilarity(tdm, comparison_metric='spearman', corrcoef_only=True)
> 
> Set up the searchlight:
> sl = sphere_searchlight(dsm, radius=3, enable_ca='ca.pvalues’)
> 
> Run it:
> slres = sl(ds)
> 
> And finally output the results in NIfTI format:
> map2nifti(slres, imghdr=ds.a.imghdr).to_filename('meansubj.rsa_orth_sl.nii.gz’)
> 
> From your documentation, it seems like there’s a way to output not only correlation coefficients for each voxel, but also p-values.

See http://www.pymvpa.org/generated/mvpa2.measures.rsa.PDistTargetSimilarity.html

corrcoef_only : bool, optional
If True, return only the correlation coefficient (rho), otherwise return rho and probability, p. Constraints: value must be convertible to type bool. [Default: False]




More information about the Pkg-ExpPsy-PyMVPA mailing list