[FieldTrip] second-level statistical inference

Sara Bögels s.bogels at psy.gla.ac.uk
Fri Nov 25 12:51:32 CET 2011


Hi Arjen,

Thank you very much for your answer. That sounds good, but step 2 does 
not work straightforwardly, since matlab gives the error message that it 
cannot find an avg field (which would not be in the structure created by 
ft_timelockstatistics). Just saying cfg.parameter = 'stat' does not 
work. I tried to get around that by inserting an avg field which is the 
same as the stat field for each participant. Matlab also asked for an 
fsample field, which I inserted from an earlier datafile. Then it 
worked. Is it ok to do this?

I did step 3 as well, using the field individual (which you get by 
keepindividuals = 'yes'). In step 4, I should just use cfg.statistic = 
'depsamplesT', right (because the variables are within subject)?

Thank you!
Sara

On 25/11/2011 09:04, Stolk, A. wrote:
> Hi Sara,
>
> If I understand correctly, you want to test intra-subject differences (between conditions) at the second level? This would require the following steps:
>
> 1) subject-level statistics, which you have done already
>
> 2) grandaverage all these, with keepindividuals=yes.
>
> 3) copy the output of the grandaverage (into a dummy variable), and replace the fields containing the subject T-values with zeros (for timelock data this may be the trial fields?)
>
> 4) again timelockstatistics, as in step 1, now with the variables following step 3. this should give you the resulting statistics of contrasting intra-subject differences vs. null at the group level.
>
> Hope this helps,
>
> Arjen
>
>
>
>
>
>
>
>
>
>
>
> ----- "Sara Bögels"<s.bogels at psy.gla.ac.uk>  schreef:
>
>> Van: "Sara Bögels"<s.bogels at psy.gla.ac.uk>
>> Aan: fieldtrip at donders.ru.nl
>> Verzonden: Donderdag 24 november 2011 15:49:17
>> Onderwerp: [FieldTrip] second-level statistical inference
>>
>> Hi all,
>>
>> I have been trying to do second-level statistical inference (as
>> described in one of the FAQs) on ERFs, but I am not sure whether I am
>>
>> doing everything correctly.
>>
>> In the first step I calculate the T-values for the difference between
>>
>> two conditions (twice), which are between items, with
>> ft_timelockstatistics. I put the output of all participants in a cell
>>
>> (called 'stat1a' and 'stat1b'). (I tried to use
>> ft_timelockgrandaverage
>> to combine the subjects together but it needs a field avg).
>>
>> Then I use ft_timelockstatistics again but  subject level. I first
>> want
>> to look at the difference between the two conditions. This difference
>> is
>> reflected in the T-values of the first step so I create a dummy which
>> is
>> the same as 'stat1' but I replace all the values in the field 'stat'
>> per
>> participant with zeros. Then I call (with appropriate cfg
>> parameters):
>>
>> stat2a = ft_timelockstatistics(cfg,stat1a{:},dummy{:});
>> stat2b = ft_timelockstatistics(cfg,stat1b{:},dummy{:});
>>
>> To compare the two differences (stat1a and stat1b) and thereby look at
>>
>> an interaction, I call:
>>
>> stat2a-b = ft_timelockstatistics(cfg,stat1a{:},stat1b{:});
>>
>> I am uncertain whether the dummy works (or is there a way to compare
>> the
>> t-values to zero directly?) and whether the stat1a{:} trick works with
>>
>> ft_timelockstatistics.
>>
>> Thanks in advance for your answer.
>>
>> Sara
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list