Hi Suresh,
Were you using an explicit mask with your MEG data? By default randomise will estimate a suitable mask from your data, but this can be inappropriate for non-FMRI data and will result in unusual "holes" or zeros in the output. In the example below, voxel 4927 ( starting from 0 ) will not be included in the default mask, but passing in an explicit "all 1s" mask will generate the correct t-value ( 10.5171 ).
Many Regards
Matthew
> Hi there,
> I am slighty confused at the moment with some of the outputs I am getting from randomise at the moment. I was trying to put some MEG time-series data through randomise and got some odd results. Back-tracking through the problem I found the results change depending on which randomise version I use.
> Specifically randomise from fsl-3.3.10 gives me exactly what I would expect but randomise (e.g. fsl 4.1.3) gives me some strange t statistics with lots of zeros placed in the "voxels"
>
> I have fired up a MATLAB program that simulates some signals below to demonstrate...
> To run it you will need the stuff in the comments and to change the two paths to call different versions of randomise.
>
> Maybe someone could shed some light on why the 2 versions give such different results on the most basic one-sample t test? I have kept the simulation pretty much as simple as possible.
>
> Thanks,
> - Suresh
>
>
>
> %Script uses
> % - MATLAB - stats toolbox
> % - fsl nifti IO functions
> % - randomise versions
> %
>
> clear; clc
>
> %Make some time-series data with an increasing main effect running through
> %the data with gaussian noise on both matrices (5000 points)
> NSubjects = 20;
> SeriesA = zeros([NSubjects 5000]) + randn([NSubjects 5000]);
> SeriesB = repmat(linspace(0,4,5000),NSubjects,1) + randn([NSubjects 5000]);
> DifferenceSeries = SeriesB - SeriesA;
>
> %Run MATLABs standard t-test
> [H,P,CI,STATS] = ttest(DifferenceSeries);
>
> %Save the Data to an Image - make the 4th dim subjects
> img(1,1,:,:) = (DifferenceSeries');
> save_avw(img, 'TestData', 'f', [1 1 1 1]);
>
> %%Run randomise using old and new versions
> fprintf('Running permutation tests...');
> !/cubric/software/fsl-3.3.10/bin/randomise -i TestData.nii.gz -o TestData_v3310 -1
> timg_v3310 = squeeze(read_avw('TestData_v3310_tstat1.nii.gz'));
>
> !/cubric/software/fsl-4.1.1/4.1.3/bin/randomise -i TestData.nii.gz -o TestData_v413 -1
> timg_v413 = squeeze(read_avw('TestData_v413_tstat1.nii.gz'));
>
> %Plot the results
> figure
> subplot(3,1,1)
> hold on
> plot(timg_v413, 'r');
> plot(STATS.tstat, 'k')
> plot(timg_v3310, 'g');
> legend('randomise_v413', 'MATLAB', 'randomise_v3310')
> legend boxoff
> ylabel('t')
> hold off
>
> subplot(3,1,2);
> plot(abs(STATS.tstat') - timg_v3310)
> ylabel('t')
> title('t stat Difference between MATLAB and v3310')
>
> subplot(3,1,3);
> plot(abs(STATS.tstat') - timg_v413)
> title('t stat Difference between MATLAB and v413')
> ylabel('t')
>
> %Done
>
|