[Mne_analysis] Repeated-measured oneway ANOVA / paired ttest in spatio temporal clustering

Laetitia Grabot laetitia.grabot at gmail.com
Mon Oct 27 11:06:04 EDT 2014
Search archives:

Ok thanks a lot!

2014-10-27 16:03 GMT+01:00 Denis A. Engemann <denis.engemann at gmail.com>:

> Hi,
>
>
>
> On 27 Oct 2014, at 15:57, Laetitia Grabot <laetitia.grabot at gmail.com>
> wrote:
>
> Ok so I understood that paired ttest = ttest of the paired contrast. Yet I
> didn't see why a paired ttest is the same thing as a 2 factors repeated
> measures anova.
>
>
> it's more precisely a 1 factot repeated measures analysis with 2 factor
> levels. the example shows how to use. this for a 2 x 2 analysis
>
> I would understand the equivalence between a paired ttest and a one way
> repeated measures anova, but why 2 factors? I also don't understand the
> squared output...
>
>
> the f-dist can be obtained from squaring the t-dist. you can try it and /
> or google it. a 1-sided t-dist is obtained from computing the square root
> of the f-dist. this is only valid for 1 factor with 2 levels
>
> And I have only one factor "Condition" with two levels "condition 1" and
> "condition 2".
>
> 2014-10-27 15:20 GMT+01:00 Denis-Alexander Engemann <
> denis.engemann at gmail.com>:
>
>> 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.
>>>
>>>
>>
>> _______________________________________________
>> 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.
>>
>>
> _______________________________________________
> 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.
>
>
> _______________________________________________
> 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/a400ecaa/attachment.html 


More information about the Mne_analysis mailing list