[Mne_analysis] Repeated-measured oneway ANOVA / paired ttest in spatio temporal clustering
Denis-Alexander Engemann
denis.engemann at gmail.com
Mon Oct 27 10:20:01 EDT 2014
Hi Laetitia,
how may 'factors' / conditions do you have?
A t-test for related samples is equivalent to a 1 smaple t-test of the
paired contrast which is the same as a repeated measures ANOVA for 2
factors after squaring the output:
def stat_fun(x):
return mne.stats.ttest_1samp_no_p(x, sigma=1e-3, method='relative') ** 2
Also see this modified example that showd how to compute an interaction
contrast using this stat_fun.
https://gist.github.com/dengemann/ff96e48dd1dd3eeaca3e
HTH,
Denis
2014-10-27 15:03 GMT+01:00 Laetitia Grabot <laetitia.grabot at gmail.com>:
> Dear mailing list,
>
> I'm doing spatio-temporal clustering on 12 subjects in source space. Very
> basically, I would like to compare two conditions by taking into account
> subjects variability, so I need to do a paired ttest/oneway
> repeated-measure ANOVA. Yet, the spatio_temporal_cluster_test function is
> only implementing oneway anova, while the spatio_temporal_cluster_1samp_test
> is implementing simple ttest on the difference
> *.*
> *I looked at related issues on github and found that there is a twoway
> anova with repeated measures function implemented under the name of
> f_twoway_rm but it doesn't work for oneway anova (factor_levels = [2],
> n_conditions = 2). Then I tried to build a stat_fun function from *
>
> *scipy.stats.ttest_rel:*
>
> *def stat_fun(*args):*
>
> * a = X[0]*
> * b = X[1]** return *
> *scipy.stats.ttest_rel(a,b)*
>
> *But I get an error at lign 708 in _permutation_cluster_test (cannot copy
> sequence with size 2 to array axis with dimension 0), I guessed there is a
> format problem in my stat_fun function...*
>
>
> *Did someone find a way to do such an analysis?*
>
>
> *Thanks in advance,Laetitia Grabot.*
>
> _______________________________________________
> 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/20141027/216aff0c/attachment.html
More information about the Mne_analysis
mailing list