Thanks Michael! I'll try scipy.stats for sure. Best, Frank
----- Original Message ---- From: Michael Hanke <[email protected]> To: Daqiang Sun <[email protected]> Cc: [email protected] Sent: Friday, May 29, 2009 11:29:35 PM Subject: Re: [pymvpa] How to do a simple t or F test in PyMVPA Hi, On Fri, May 29, 2009 at 07:15:45PM -0700, Daqiang Sun wrote: > Dear all, > I was wondering how I can do a between-group voxel-wise t (or F, two > groups though) test with PyMVPA. We have a paper in revision in which > we applied PyMVPA classification, and we need to do some more > calculations. > My data are pretty simple. They are two groups of preprocessed > structural images with labels 0 and 1. I don't need multiple > comparison correction at this stage. I just want to count the number > of voxels above an t/F or below a P value. > I tried default OneWayAnova, like: > > anova = OneWayAnova() > > fmap = anova(data) > but the numbers I got doesn't look like F values. We should have a lot > of significant voxels but the values I got here are between 0 and 1. > I guess I must have done something wrong here. What is OneWayAnova > really for? Should I use GLM instead? How should I set up the options? > I'd appreciate it if anyone could point me to a solution. Thanks in > advance! Grmpf... I guess you are right. OneWayAnova() would be the way to generate F-scores, but it looks like it doesn't not return properly F-distributed scores, because it does not consider the degrees of freedom -- unfortunately, it is probably me who is responsible :( For now I would recommend to use SciPy's F-test implementation, e.g. like this: >>> scipy.stats.f_oneway(ds['labels', [0]].samples, ... ds['labels', [1]].samples) That will give you both F-scores and associated p-value. Moreover, I will fix OneWayAnova to use SciPy as well. For additional tests also scipy.stats is probably the best source. Sorry, Michael -- GPG key: 1024D/3144BE0F Michael Hanke http://apsy.gse.uni-magdeburg.de/hanke ICQ: 48230050 _______________________________________________ Pkg-ExpPsy-PyMVPA mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa

