Hanneke Van Dijk Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE
Thu Jun 4 11:01:37 CEST 2009

Dear Rodrigo,

I'm wondering if the error is the same for all number-combinations that you used. I agree with Ingrid that cfg.uvar should be 2. When I test this specific part of the scripts, it seems to work for me (I don't get any error).

So next I wonder what the avg1 and avg2 variables look like. The tutorial is written for grandaverage variables which include the field 'individual' (therefore, cfg.parameter='individual', cfg.parameter is the value you want to do statistics on). This field 'individual' contains the data for all subjects. 

Since you are looking at one subject only I guess you don't have this field. So the cfg.parameter should be 'trial'.  So check if avg1 and avg2 have the field 'trial' if not  do timelockanalysis again with cfg.keeptrials = 'yes'.

cfg.design should then be dependent on the number of trials and not on number of subjects. If you have 10 trials for both conditions it should look something like this:

Ntrials = 10 ;
cfg.design(1,1:2*Ntrials)  = [ones(1,Ntrials) 2*ones(1,Ntrials)];
cfg.design(2,1:2*Ntrials)  = [1:Ntrials 1:trials];

cfg.design then will look like this:


ans =

  Columns 1 through 15

     1     1     1     1     1     1     1     1     1     1     2     2     2     2     2
     1     2     3     4     5     6     7     8     9    10     1     2     3     4     5

  Columns 16 through 20

     2     2     2     2     2
     6     7     8     9    10

The first 10 trials belong to condition 1 and the second 10 to condition 2.

This is probably why you get the design error. It doesn't fit with the parameter you want to do statistics on.

I hope this was a correct hypothesis and my reply will help you!

Best Regards,


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 --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20090604/faaeed5b/attachment-0002.html>

More information about the fieldtrip mailing list