timelock statistic

Hanneke van Dijk Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE
Thu Jun 4 11:07:52 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:
>
> cfg.design
>
> 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,
>
> Hanneke
>
> On Wed, Jun 3, 2009 at 10:30 PM, Rodrigo A. Montefusco Siegmund <
> rmontefusco at med.uchile.cl> wrote:
>
>> Dear Ingrid
>>
>> I tried with many numbers combinations...but nothing happens.
>>
>> :(
>>
>> Rodrigo
>>
>> > Dear Rodrigo,
>> >
>> > I think you have a typo in your design specification cfg.ivar and
>> cfg.uvar
>> > is both 1, but in your comment you correctly state that uvar should be
>> 2.
>> >
>> > Hope this helps,
>> > Ingrid
>> >
>> >> -----Original Message-----
>> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
>> >> Behalf Of Rodrigo A. Montefusco Siegmund
>> >> Sent: Wednesday, June 03, 2009 10:20 PM
>> >> To: FIELDTRIP at NIC.SURFNET.NL
>> >> Subject: Re: [FIELDTRIP] Difference between tfr and wltconvol
>> >>
>> >> Dear FTers
>> >>
>> >> I have (still) problems with my timelock statistic script. I tried to
>> >> develop a very simple analysis to prove all the posibilities, inclusive
>> >> doing all manually. But it continues with error messages. I'll copy my
>> >> code and de erros that apear when I ran it. I'm trying to compare one
>> >> subject in two diferent conditions.
>> >>
>> >> %------------------------------------------
>> >> cfg.channel     = 'all';
>> >> cfg.latency     = 'all';
>> >> cfg.avgoverchan = 'no';
>> >> cfg.avgovertime = 'yes';
>> >> cfg.parameter   = 'individual';
>> >> cfg.method      = 'analytic';
>> >> cfg.statistic   = 'depsamplesT';
>> >> cfg.alpha       = 0.05;
>> >> cfg.correctm    = 'bonferoni';
>> >>
>> >> Nsub = 1;
>> >> cfg.design(1,1:2*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub)];
>> >> cfg.design(2,1:2*Nsub)  = [1:Nsub 1:Nsub];
>> >> cfg.ivar                = 1; % the 1st row in cfg.design contains the
>> >> independent variable
>> >> cfg.uvar                = 1; % the 2nd row in cfg.design contains the
>> >> subject number
>> >>
>> >> [stat] = timelockstatistics(cfg, avg1, avg2);
>> >> %----------------------------------------------------------
>> >>
>> >> actually is almost the same as in the tutorial.
>> >>
>> >> the errors are...
>> >>
>> >> -----------------------------------------------------------
>> >> ??? Error using ==> statfun_depsamplesT at 81
>> >> Invalid specification of the design array.
>> >>
>> >> Error in ==> statistics_analytic at 92
>> >>   [stat, cfg] = statfun(cfg, dat, design);
>> >>
>> >> Error in ==> statistics_wrapper at 381
>> >>   [stat, cfg] = statmethod(cfg, dat, cfg.design);
>> >>
>> >> Error in ==> timelockstatistics at 112
>> >> [stat] = statistics_wrapper(cfg, varargin{:});
>> >>
>> >> Error in ==> ERPStatistics at 19
>> >> [stat] = timelockstatistics(cfg, avg1, avg2);
>> >> -----------------------------------------------------------
>> >>
>> >> please help!
>> >>
>> >> warm regards for all!
>> >>
>> >> Rodrigo
>> >>
>> >>
>> >>
>> >> ===================================
>> >> Rodrigo A. Montefusco Siegmund
>> >> Doctorado en Ciencias Biomédicas
>> >> Programa de Fisiología y Biofí­sica
>> >> I. C. B. M. Facultad de Medicina
>> >> Universidad de Chile
>> >> Fono: 56 09 82793847
>> >> email:  rmontefusco at med.uchile.cl
>> >> ===================================
>> >>
>> >> ----------------------------------
>> >> 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.
>> >
>>
>>
>> ===================================
>> Rodrigo A. Montefusco Siegmund
>> Doctorado en Ciencias Biomédicas
>> Programa de Fisiología y Biofí­sica
>> I. C. B. M. Facultad de Medicina
>> Universidad de Chile
>> Fono: 56 09 82793847
>> email:  rmontefusco at med.uchile.cl
>> ===================================
>>
>> ----------------------------------
>> 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 --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20090604/88e4618e/attachment-0001.html>


More information about the fieldtrip mailing list