[FieldTrip] Quick question about STAT (error and weird output)

Davide Rivolta drivolta81 at gmail.com
Mon Mar 9 21:10:04 CET 2015


Dear Robert,

thanks for the prompt reply. I was using the 20150113 version. I have now
downloaded the most recent version (20150308).

As you predicted the last error disappeared, but after running the same
script, I got this one:

Error using getdimord (line 15)
field "avg" not present in data

Error in ft_timelockstatistics (line 114)
dimord = getdimord(varargin{1}, cfg.parameter);

It is weird that it is looking for "avg" since I had to indicate
keepindividual='yes' in the ft_timelockgrandaverage step.

I am sure it is something silly, but if someone is willing to help me out
here, I would be grateful.

Many thanks,
Davide

On Mon, Mar 9, 2015 at 6:52 PM, Robert Oostenveld <
r.oostenveld at donders.ru.nl> wrote:

> Hi Davide
>
> The details of the error messages reveal that you are using an old version
> of FieldTrip. Some of the low level functions it shows do not exist any
> more.
>
> Please update to the latest version and try again.
>
> Robert
>
>
> > On 9 mrt. 2015, at 18:28, Davide Rivolta <drivolta81 at gmail.com> wrote:
> >
> > Dear all,
> >
> > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects -
> within subjects design).
> > According to the code I use, I get in the order, an ERROR or I see
> something weird and I wish to have an opinion.
> > See the script below:
> >
> > Here is my script:
> > % ERPs grandaverage calculation for 4 conditions
> > cfg = [];
> > cfg.keepindividual = 'yes';
> > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:});
> > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:});
> > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:});
> > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:});
> >
> > % t-tests
> > cfg            = [];
> > cfg.method     = 'triangulation';
> > cfg.layout   = 'GSN-HydroCel-128.sfp';
> > cfg.neighbourdist  = 2;
> > cfg.senstype   = 'EEG';
> > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg);
> >
> > cfg = [];
> > cfg.channel     = 'EEG';
> > cfg.minnbchan   = 2;
> > cfg.neighbours  = neighbours_EEG;
> > cfg.latency     = [1.17 1.25];
> > cfg.avgovertime = 'no';
> > cfg.parameter   = 'avg';
> > cfg.method      = 'montecarlo';
> > cfg.statistic   = 'ft_statfun_depsamplesT';
> > cfg.alpha       = 0.05;
> > cfg.clusteralpha = 0.05;
> > cfg.correctm    = 'cluster';
> > cfg.correcttail = 'prob';
> > cfg.numrandomization = 1000;
> > cfg.tail = 0;
> > cfg.clustertail = 0;
> >
> > Nsub = length(names);
> > 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                = 2; % the 2nd row in cfg.design contains the
> subject number
> >
> > IF I USE THIS CODE:
> > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg);
> >
> > I GET TE ERROR:
> > Reference to non-existent field 'dat'.
> >
> > Error in prepare_timefreq_data>forcedimord (line 531)
> >   Nrepl = size(output.dat, repldim);
> >
> > Error in prepare_timefreq_data (line 87)
> >   [remember{c}, hascrsspctrm] = forcedimord(varargin{c});
> >
> > Error in statistics_wrapper (line 235)
> >   [cfg, data] = prepare_timefreq_data(cfg, varargin{:});
> >
> > Error in ft_timelockstatistics (line 113)
> > [stat, cfg] = statistics_wrapper(cfg, varargin{:});
> >
> >
> > - Note that this worked in very earlier versions of FT
> >
> >
> >
> > IF I USE THIS CODE
> > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:});
> >
> > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters
> (see attched figure).
> >
> >
> > What I am doing wrong? Any advice would be great.
> >
> >
> > Many thanks,
> > Davide
> >
> >
> >
> > --
> > Davide Rivolta, PhD
> > <stat_plot.tif>
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 
Davide Rivolta, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150309/dc7cbc6b/attachment-0002.html>


More information about the fieldtrip mailing list