Back to the main page.
Bug 3150 - critical value for indepsamplesT
Status |
ASSIGNED |
Reported |
2016-06-20 11:21:00 +0200 |
Modified |
2016-06-20 11:36:38 +0200 |
Product: |
FieldTrip |
Component: |
core |
Version: |
unspecified |
Hardware: |
PC |
Operating System: |
Mac OS |
Importance: |
P5 normal |
Assigned to: |
Robert Oostenveld |
URL: |
|
Tags: |
|
Depends on: |
|
Blocks: |
|
See also: |
|
Robert Oostenveld - 2016-06-20 11:21:49 +0200
Cris wrote:
Another participant in Coimbra tried to run intependent t-test with different subject numbers (14 vs 19) and using ft_freqstatistics
and got an error acout no being able to determine the critical value for the t-stat
Maybe wrong input data?
Robert Oostenveld - 2016-06-20 11:36:38 +0200
I did the following, which works for me. Do you know more details of what failed?
----------
condition1 = {};
condition2 = {};
nsamples = 100000;
%% create the data
for i=1:14
timelock = [];
timelock.dimord = 'chan_time';
timelock.label = {'1'};
timelock.time = 1:nsamples;
timelock.avg = 1+randn(1,nsamples);
condition1{i} = timelock;
end
for i=1:19
timelock = [];
timelock.dimord = 'chan_time';
timelock.label = {'1'};
timelock.time = 1:nsamples;
timelock.avg = 1+randn(1,nsamples);
condition2{i} = timelock;
end
%% do the statistics
cfg = [];
cfg.method = 'analytic';
cfg.statistic = 'indepsamplesT';
cfg.correctm = 'no';
cfg.design = [1*ones(1,14) 2*ones(1,19)];
cfg.ivar = 1;
stat = ft_timelockstatistics(cfg, condition1{:}, condition2{:});
%% this is not part of the bug report, but easy to check here
assert(mean(stat.mask)>0.05-0.02, 'not enough false alarms');
assert(mean(stat.mask)<0.05+0.02, 'too many false alarms');