clusterrandanalysis on scalar values + problem with topoplotER
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Thu Oct 19 16:39:17 CEST 2006
Dear Marco
On 19 Oct 2006, at 12:13, Marco Buiatti wrote:
> computing statistic 1 from 8
> Warning: Divide by zero.
>> In fieldtrip-20061016\private\statfun_depsamplesT at 106
> In statistics_montecarlo at 278
> In fieldtrip-20061016\private\statistics_wrapper at 233
> In timelockstatistics at 50
> computing statistic 2 from 8
> Warning: Divide by zero.
>> In fieldtrip-20061016\private\statfun_depsamplesT at 106
> In statistics_montecarlo at 278
> In fieldtrip-20061016\private\statistics_wrapper at 233
> In timelockstatistics at 50
>
> ... same output up to statistic 8 and then
Hmm, to me this seems to indicate that you have samples at which you
do not have any variance, i.e. the computation of the t-score is
mean_difference/pooled_variance, and since variance is zero, you have
someting divided by zero, probably resulting in "Inf", i.e. infinite
numbers. Could it be that you have baseline corrected data that is
corrected to only one sample (i.e. the sample at time t=0), and that
hence one sample in the data is always zero?
I don't know how a t-score of Inf will affect the other computations.
But the actual problem is
> ??? Attempted to access (2); index out of bounds because numel()=1.
>
> Error in ==> fieldtrip-20061016\private\clusterstat at 65
> postailcritval = cfg.clustercritval(2);
>
> Error in ==> statistics_montecarlo at 305
> stat = clusterstat(cfg, statrand, statobs);
>
> Error in ==> fieldtrip-20061016\private\statistics_wrapper at 233
> [stat, cfg] = statmethod(cfg, dat, cfg.design);
>
> Error in ==> timelockstatistics at 50
> [stat] = statistics_wrapper(cfg, varargin{:});
That problem is NOT due to the warning above (i.e. the potential t-
value of inf), but just a small programming error. The sequence of if-
statements in that section of code was the wrong way around. Please
find a corrected version of clusterstat.m attached to this mail.
Actually, looking further into the code, I am surprised that you get
this error. It means that the low level statfun_depsamplesT is using
a cfg.tail=1 (that corresponds to cfg.clustertail in
statistics_montecarlo itself). But from your cfg I do not see that
you explicitely define a positive-tailed test, and the default set at
the level of statistics_montecarlo should be two-tailed. Do you have
any ideas about this yourself?
best regards,
Robert
---
PS you can type
dbstop if error
on the matlab promt to start using the matlab debugger, and
dbclear all
to get rid of it again. That will help a lot in diagnosing problems
like these. See "help dbstop"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clusterstat.m
Type: application/octet-stream
Size: 26868 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061019/bfee853e/attachment-0002.obj>
More information about the fieldtrip
mailing list