problem with freqstatistics

Oakman, Erin Erin.Oakman at NYUMC.ORG
Thu Dec 10 22:48:29 CET 2009


Hi,

 I am following the cluster-based statistics tutorial called cluster_permutation_freq, "within trial experiments."  When defining "baseline" and "activation" times with 1 subject,  I have an error using redefinetrial to choose the nonoverlapping and equal length trials.  For example,

 % redefine
  cfg = [];
  cfg.toilim = [-0.5 0];
  data_baseline = redefinetrial(cfg, data);
??? Error using ==> redefinetrial at 66
the trial definition is inconsistent with the data
 
Specifically, there is no trl field in my data.   Somehow the trl field was lost after channelrepair and appenddata.  However, it is possible to redefine the activation and baseline time manually.  Then I make the time-frequency files on baseline and activation, and test with freqstatistics:

 %freqstatistics with cluster
        cfg=[];
        cfg.method='montecarlo';
        cfg.statistic= 'actvsblT';
        cfg.parameter='powspctrm';      
        cfg.channel='all';
        cfg.avgoverchan='no';
        cfg.latency='all'; %[0.05 0.45];
        cfg.avgovertime='no';
        cfg.frequency=[39 41]; %'all';
        cfg.avgoverfreq='yes';     
        cfg.correctm='cluster';
        cfg.clusteralpha=0.05;
        cfg.clusterstatistic='maxsum';
        cfg.elecfile='/home/eo/science/layout/biosemi.sfp';
        cfg.neighbourdist=2.5;             
%         cfg.minnbchan=2; %default=0
        cfg.tail=0; %default=0
        cfg.alpha=0.05;
        cfg.numrandomization=500;
        stat = freqstatistics(cfg, data_baseline, data_activation);
??? Undefined variable "data" or class "data.biol".

Error in ==> prepare_design at 85
  nrepl=size(data.biol,1);

Error in ==> statistics_wrapper at 233
  [cfg] = prepare_design(cfg);

Error in ==> freqstatistics at 89
  [stat, cfg] = statistics_wrapper(cfg, varargin{:});


 The powspctrm field in data_baseline.powspctrm and data_activation.powspctrm is 4D (rptxchanxfreqxtime), and the rpt,freq,time, and label fields have the same dimensions.  Do I have to use redefinetrial before freqanalysis?  Any advice is appreciated.

Erin

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

----------------------------------
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.



More information about the fieldtrip mailing list