[FieldTrip] ft_freqstatistics and FDR-correction
jan-mathijs schoffelen
jan.schoffelen at donders.ru.nl
Tue Jan 25 20:57:03 CET 2011
Hi Patricia,
I don't really understand what is going on, but could you try to
specify your design only in a single row (design = design(2,:) in your
case), specify cfg.ivar = 1; and cfg=rmfield(cfg,'uvar'), and see how
it runs? As such the uvar row is not relevant in an independent
samples design.
Best,
Jan-Mathijs
On Jan 25, 2011, at 6:08 PM, Patricia Wollstadt wrote:
> Dear all,
>
> I'm still trying to identify the underlying reason for the issue
> described below. I ran the analysis in debug mode (I'm using
> Matlab2008b and the Fieldtrip-release from the 16th of January 2011)
> and found that the matrix 'resample', that is generated in
> 'statistics_montecarlo', line 187:
>
> resample = resampledesign(cfg, design);
>
> doesn't contain actual permutations of my initial design, but rather
> sorted rowvectors from 1 to 80 (no of subjects). So (since there is
> no permutation of the units of observation) the 'randstat' that is
> subsequently calculated for each row of the resample-matrix is
> always the same.
> Is this maybe due to my design and my units of observations
> respectively? I am looking at age-dependent variations in resting-
> state data, so my UO are 80 subjects, divided into four age groups.
> The commandline-output of the 'resampledesign'-function is as follows:
>
> total number of measurements = 80
> total number of variables = 2
> number of independent variables = 1
> number of unit variables = 1
> number of within-cell variables = 0
> number of control variables = 0
> using a permutation resampling approach
> repeated measurement in variable 1 over 80 levels
> number of repeated measurements in each level is 1 1 1 1 1 1 1 1 1 1
> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> 1 1
>
>
> Is this correct? Shouldn't this read 'repeated measurement in
> variable 2 over 4 levels' with the number of subjects per group as
> repeated measurements within a condition? Still I am pretty sure
> about my design matrix, which contains the indices 1 to 80 (for all
> subjects) in the first row (this is my cfg.uvar) with the
> corresponding age groups (1 to 4) in the second row (cfg.ivar, see
> my previous email below). I use an 'indepsamplesF'-statistic, since
> I am comparing between four groups of different subjects (averaged
> over trials).
>
> I hope, I got the settings and my design right. Any suggestions,
> whether this is a problem due to wrong configurations in my script
> are very welcome.
>
> Right now I work around this issue by replacing line 279 in
> 'statistics_montecarlo':
>
> tmpdesign = design(:,resample(i,:));
>
> with:
>
> tmpdesign = design(:,randperm(size(design,2)));
>
> creating permutations of my design 'by hand'. Is this acceptable or
> is there anything I'm maybe missing.
>
> Thank you very much, kind regards,
>
> Patricia
>
>
>
>
> -------- Original-Nachricht --------
>> Datum: Mon, 24 Jan 2011 17:47:26 +0100
>> Von: "Patricia Wollstadt" <Patricia.Wollstadt at gmx.de>
>> An: fieldtrip at donders.ru.nl
>> Betreff: [FieldTrip] ft_freqstatistics and FDR-correction
>
>> Dear Fieldtrip-users,
>>
>> I'm currently trying to calculate freqstatistics for four
>> experimental
>> groups, using the following options:
>>
>> groupSize=[length(subjects{1}) length(subjects{2})
>> length(subjects{3})
>> length(subjects{4})];
>>
>> design = [1:groupSize(1)+groupSize(2)+groupSize(3)+groupSize(4)];
>> % 1 to N subjects
>> design(2,:) = [ones(1,groupSize(1)) 2*ones(1,groupSize(2))
>> 3*ones(1,groupSize(3)) 4*ones(1,groupSize(4))]; % indep var ->
>> group membership
>>
>>
>> cfg=[];
>> cfg.design=design;
>> cfg.uvar = 1;
>> cfg.ivar = 2;
>> cfg.method = 'montecarlo';
>> cfg.statistic = 'indepsamplesF';
>> cfg.correctm = 'fdr';
>> cfg.numrandomization = 180000;
>> cfg.alpha = 0.01/7;
>> cfg.tail = 1;
>> cfg.design = design;
>> cfg.channels = myChannels;
>> cfg.avgovertime = 'yes';
>> cfg.avgoverfreq = 'yes';
>> cfg.frequency = [1 3];
>>
>> stat = ft_freqstatistics(cfg, group1avg, group2avg, group3avg,
>> group4avg);
>>
>> With these settings, the coputation itself runs fine, but the
>> resulting
>> 'prob'-matrix contains only zeros (accordingly the 'mask'-matrix
>> consists of
>> only ones). This would mean, that I found significant effects for all
>> channels. Is this possible or rather due to an error somewhere in
>> my script? Is
>> it likely, that these are 'real' zeroes or rather very small
>> values, close
>> to zero?
>> Any hints and suggestions are very welcome, thank you in advance,
>>
>> Kind regards
>>
>> Patricia Wollstadt
>>
>>
>> --
>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793
More information about the fieldtrip
mailing list