Update: Freqstatistics Now Yields Sign ificant Clusters

Michael Wibral wibral at BIC.UNI-FRANKFURT.DE
Wed Jun 17 09:24:41 CEST 2009


Hi Charles,

the plots look OK to me. Could you let us know what finally made your analysis work (if there was a single most important thing)
- that would be most helpful. 

Thanks,
Michael

> -----Ursprüngliche Nachricht-----
> Von: "Charles Cook" <charles.cook at ULETH.CA>
> Gesendet: 16.06.09 22:46:18
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: [FIELDTRIP] Update: Freqstatistics Now Yields Significant Clusters


> Hi all,
> 
> I just wanted to post a follow-up to my previous posted problem of being
> unable to obtain significant clusters using freqstats. I've included my code
> for what I believe (and hope...) is our success at obtaining clusters in our
> analysis, and acknowledge the help we received from the FieldTrip board
> users, in particular Michael and Eric whose suggestions were immensely
> helpful. Thanks again!
> 
> Here's our code below. Our study has both between (sex) and within group
> components (task1 vs. task2). 
> 
> =====================================================================
>  
> % this is the list of BESA datafiles in the Female Feature condition
> filename_femfeat = {
> .
> .
> .
> };
>  
> nsubj = length(filename_femfeat);
>  
> for i=1:nsubj
>   femfeat{i} = besa2fieldtrip(filename_femfeat{i});
> end
>  
> % this is the list of BESA datafiles in the Female Location condition
> filename_femloc = {
> .
> .
> .
> };
>  
> for i=11
> nsubj = length(filename_femloc);
> end
>  
> for i=1:nsubj
>   femloc{i} = besa2fieldtrip(filename_femloc{i});
> end
>  
> % this is the list of BESA datafiles in the Male Feature condition
> filename_malefeat = {
> .
> .
> .
> };
> for i=11
> nsubj = length(filename_malefeat);
> end
>  
>  
> % this is the list of BESA datafiles in the Male Location condition
> filename_maleloc = {
> .
> .
> .
> };
> for i=11
> nsubj = length(filename_maleloc);
> end
> %}
>  
> % collect all single subject data in a convenient cell-array
> for i=1:nsubj
>   femfeat{i} = besa2fieldtrip(filename_femfeat{i});
>   femloc{i} = besa2fieldtrip(filename_femloc{i});
>   malefeat{i} = besa2fieldtrip(filename_malefeat{i});
>   maleloc{i} = besa2fieldtrip(filename_maleloc{i});
> end
>  
>  
> %Read in the electrode locations for the Std81 montage
> cfg = [];
> elec = read_fcdc_elec('EGI-BESA_Standard_81_prime.sfp');
> elec.pnt = 1000*elec.pnt;
>  
> % recompute the average, except do _not_ average but keepindividual
> % this collects all identical time/frequency/channel samples over all
> % subjects into a single data structure
> cfg = [];
> cfg.keepindividual = 'yes';
> maleloc_all = freqgrandaverage(cfg, maleloc{:});
> femloc_all = freqgrandaverage(cfg, femloc{:});
> malefeat_all = freqgrandaverage(cfg, malefeat{:});
> femfeat_all = freqgrandaverage(cfg, femfeat{:});
>  
>  
> % perform the statistical test using randomization and a clustering approach
> % using the NEW freqstatistics function
> cfg = [];
> cfg.neighbourdist    = 45;
> cfg.elec             = elec;
> cfg.statistic        = 'indepsamplesT';
> cfg.minnbchan        = 0;
> cfg.clusteralpha     = 0.05;
> cfg.alpha            = 0.05;
> cfg.clustertail      = 0;
> cfg.numrandomization = 5000;
>  
> cfg.latency          = [0 1000];
> cfg.frequency        = [4 7];
> cfg.avgovertime      = 'no'; 
> cfg.avgoverfreq      = 'yes';
> cfg.avgoverchan      = 'no';
>  
> cfg.correctm         = 'cluster';
> cfg.method           = 'montecarlo';
> cfg.feedback         = 'gui';
> cfg.design           = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> 21 22;   % subject number
>                         1 1 1 1 1 1 1 1 1 1  1  2  2  2  2  2  2  2  2  2  2
>  2]; % condition number
>  
> %cfg.design           = [1 2 3 4 5 6 7 8 9 10 11 1  2  3  4  5  6  7  8  9 
> 10 11;   % subject number
>                         %1 1 1 1 1 1 1 1 1 1  1  2  2  2  2  2  2  2  2  2 
> 2  2]; % condition number
>                           
>                     
> cfg.uvar = 1;                                   % "subject" is unit of
> observation
> cfg.ivar = 2;                                   % "condition" is the
> independent variable
> stat = freqstatistics(cfg, maleloc_all, femloc_all);
> %stat = freqstatistics(cfg, femfeat_all, malefeat_all);
> %stat = freqstatistics(cfg, maleloc_all, malefeat_all);
> %stat = freqstatistics(cfg, femfeat_all, femloc_all);
>  
> cfg = [];
> cfg.elec  = elec;
> cfg.rotate = 0;
> %cfg.zlim = [-6 6];
> cfg.alpha = 0.05;
> cfg.label = stat.label;
> cfg.electrodes = 'labels';
> cfg.showxlim = 'yes';
> cfg.showzlim = 'yes';
> cfg.showylim = 'yes';
> clusterplot (cfg, stat);
> =====================================================================
> 
> Our results indicated the following:
> .
> .
> .
> reading time-frequency representation using BESA toolbox
> reading power on 81 channels
> not computing grand average, but keeping individual power for 11 subjects
> not computing grand average, but keeping individual power for 11 subjects
> not computing grand average, but keeping individual power for 11 subjects
> not computing grand average, but keeping individual power for 11 subjects
> 
> selected 81 channels
> selected 21 time bins
> averaging over 4 frequency bins
> 
> Warning: PACK can only be used from the MATLAB command line.
> > In fieldtrip\private\prepare_timefreq_data at 310
>   In fieldtrip\private\statistics_wrapper at 206
>   In freqstatistics at 132
>   In CMCWM2_std81 at 139
> 
> Obtaining the electrode configuration from the configuration.
> there are on average 4.7 neighbours per channel
> using "statistics_montecarlo" for the statistical testing
> using "statfun_indepsamplesT" for the single-sample statistics
> constructing randomized design
> total number of measurements     = 22
> 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 22 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 
> computing a parmetric threshold for clustering
> estimated time per randomization is 0 seconds
> found 4 positive clusters in observed data
> found 7 negative clusters in observed data
> using a cluster-based method for multiple comparison correction
> the returned probabilities and the thresholded mask are corrected for
> multiple comparisons
> 
> There are 2 clusters smaller than alpha (0.05)
> Positive cluster: 1, pvalue: 0 (*), t = 100 to 450
> Negative cluster: 1, pvalue: 0 (*), t = 0 to 100
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> creating layout from cfg.elec
> 
> =====================================================================
> 
> I've also attached a jpg of the above result and our .sfp file if anyone is
> interested in further information. Thanks once again for the help!
> 
> Cheers,
> 
> Charles Cook
> 
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
> 
> 



----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 344 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20090617/f073f197/attachment-0001.vcf>


More information about the fieldtrip mailing list