[Mne_analysis] plot_cluster_stats_spatio_temporal

Matt Erhart merhart at ucsd.edu
Wed Jan 8 18:30:12 EST 2014
Search archives:

I actually already have that 2samp example working on my data, but I used
two conditions in one group instead of two groups of subjects just to get
it working. I started with the 2samp because the structure was what I was
familiar with coming from matlab's ttest functions, i.e. pass both
conditions instead of a subtraction. Is there a way to easily modify the
2samp example to be valid with a 1samp situation? I tried
stat_fun=scipy.stats.ttest_rel, but it looks like I need to create a series
of my own functions as you have with f_oneway.

I should mention that I've done everything in matlab/fieldtrip so far, and
I am learning python in order to get these cluster methods working on our
data (in source space), so it will take some effort to put together my own
stat_fun.

I am happy to open a issue on github. The primary goal of the issue would
be to get cluster with TFCE with "hat" working in a 1 or 2 sample
situation, so I can use the same method for my group and condition
comparisons if that's possible. Should I add that to the issue page with an
ENH tag?

Are there any resources (such as powerpoint slides from a talk) that
explain the clustering used here from the ground up?

thanks,
Matt









On Wed, Jan 8, 2014 at 11:53 AM, Eric Larson <larson.eric.d at gmail.com>wrote:

> Hey Matt,
>
> The statistical functions are designed to accommodate different
> statistical measures on their inputs. See if you can use the 2-sample
> version, changing the statistical function (`stat_fun`) being called to one
> of your own (by default it uses `f_oneway`):
>
>
> https://github.com/mne-tools/mne-python/blob/master/mne/stats/cluster_level.py#L1267
>
> Sorry this function isn't in the documentation -- it should be! I fixed it
> in master, so the function should show up in the developmental version of
> the documentation in the next couple days:
>
> http://martinos.org/mne/dev/python_reference.html#statistics
>
> In the meantime you can see the example using it in the docs:
>
>
> http://martinos.org/mne/stable/auto_examples/stats/plot_cluster_stats_spatio_temporal_2samp.html#example-stats-plot-cluster-stats-spatio-temporal-2samp-py
>
> If this function won't work for your use case, open an issue on GitHub and
> we can talk about how to expand or modify the API (and hopefully add an
> example along the way).
>
> Cheers,
> Eric
>
>
>
> On Wed, Jan 8, 2014 at 11:23 AM, Matt Erhart <merhart at ucsd.edu> wrote:
>
>> Is there a way currently to do the 1samp test without assuming equal
>> variance?
>>
>>
>> On Wed, Jan 8, 2014 at 12:27 AM, Alexandre Gramfort <
>> alexandre.gramfort at telecom-paristech.fr> wrote:
>>
>>> > In the example online, plot_cluster_stats_spatio_temporal.py, X is
>>> passed in
>>> > to ttest 0 and 1 in the forth dimension: X = X[:, :, :, 0] - X[:, :,
>>> :, 1] #
>>> > make paired contrast.
>>> > That subtraction seems strange to me since it seems to lose the
>>> variance
>>> > unique to each condition. I would have expected something more like
>>> > ...1samp_test(X[:, :, :, 0], X[:, :, :, 1]). What am I missing here?
>>>
>>> you're right. We assume here equal variance and then the paired t test
>>> is just a one sample test on the difference.
>>>
>>> suggestions of improvement are really welcome.
>>>
>>> > Also, my ultimate goal is 1samp and 2samp spatio-temporal clustering
>>> with
>>> > TFCE with MEG. ANOVA for groupxcondition would be great as well. In
>>> > spatio_temporal_cluster_1samp_test, the doc says TFCE will be used if
>>> a dict
>>> > is passed in for threshold=, but what is that dict suppose to look
>>> like?
>>>
>>> have a look at the TFCE example
>>>
>>>
>>> http://martinos.org/mne/stable/auto_examples/stats/plot_cluster_methods_tutorial.html
>>>
>>> and especially the variable:
>>>
>>> threshold_tfce
>>>
>>> > Much thanks for the excellent package,
>>>
>>> thanks
>>>
>>> > P.S. Anaconda was really important for getting this working in centos5
>>> > without root access. Spyder is working as well which is great for
>>> > transitioning from matlab.
>>>
>>> that's indeed what we recommend to install to get started
>>>
>>> Best,
>>> Alex
>>>
>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140108/f6040ea8/attachment.html 


More information about the Mne_analysis mailing list