Print

Print


Hi David


You create F contrast and thus ess files -- these are sum of squares and thus have no positve/negative values. Second level must be done on con files, combinations of betas which have real +/- values.


Having said that, you cannot do a t stat to combine the different cosines (summing would be silly), and indeed using a F test using the identify matrix makes sense as you want to see the contribution of any of those basis function. The only thing I can think of is to set up an ANOVA model with all the betas (57 of them by the look of your F contrast) for all subjects ; the design would have 58 columns (adding the constant) and then a F test here should tell you overall where does it fit. You can then check individual contributions which relate to frequencies. 


Cyril


--
Dr Cyril Pernet,
Senior Academic Fellow, Neuroimaging Sciences
Software Sustainability Institute Fellow 

The University of Edinburgh
Centre for Clinical Brain Sciences (CCBS)
Chancellor's Building, Room GU426D
49 Little France Crescent
Edinburgh EH16 4SB
[log in to unmask]



From: SPM (Statistical Parametric Mapping) <[log in to unmask]> on behalf of David Hofmann <[log in to unmask]>
Sent: 20 February 2018 12:06
To: [log in to unmask]
Subject: [SPM] GLM for resting state problems
 
Hi all,

I tried calculating a GLM for identifying resting state fluctuations with DCT basis functions. For this, I ran the code below and defined an F-contrast over all DCT's. Then I ran a one-sample t-test over the resulting ess*.nii files. 

I generated the DCTs with the code previously shared here: 

N  = 200; % number of scans
TR = 2; % TR in {s}
h  = [0.01 0.08]; % {Hz}
n  = fix(2*(N*TR)*h + 1);
X  = spm_dctmtx(N);
X  = X(:,n(1):n(2));
save(fullfile(dataFolder,'DCT.txt'),'X','-ascii');
 
and included the file as multiple regressor (note movement, WM and CSF has been regressed out before, so it is not included here):

matlabbatch{1}.spm.stats.fmri_spec.dir          = cellstr(glmFol);
matlabbatch{1}.spm.stats.fmri_spec.timing.units = 'scans';
matlabbatch{1}.spm.stats.fmri_spec.timing.RT    = TR;
matlabbatch{1}.spm.stats.fmri_spec.sess.scans   = cellstr(spm_select('ExtFPList',dataFolder, '^sw.*\.nii$',Inf));
matlabbatch{1}.spm.stats.fmri_spec.sess.multi_reg = cellstr(fullfile(dataFolder,'DCT.txt')); %Include DCT basis functions
matlabbatch{1}.spm.stats.fmri_spec.mthresh = 0;
matlabbatch{1}.spm.stats.fmri_spec.mask = maskFile;
matlabbatch{1}.spm.stats.fmri_spec.sess.hpf = 200;
% SPM estimation
matlabbatch{2}.spm.stats.fmri_est.spmmat = cellstr(fullfile(glmFol,'SPM.mat'));
%Create F-contrast
matlabbatch{3}.spm.stats.con.spmmat = cellstr(fullfile(glmFol,'SPM.mat'));
matlabbatch{3}.spm.stats.con.consess{1}.fcon.name = 'cosine';
matlabbatch{3}.spm.stats.con.consess{1}.fcon.weights = eye(57);
matlabbatch{3}.spm.stats.con.consess{1}.fcon.sessrep = 'none';
matlabbatch{3}.spm.stats.con.delete = 1;


It seems, the whole brain is "active" and the highest t-values are found in the white matter, which is odd (see Figure, thresholded at a t-value of 10). I figure I must have done something wrong and hope for some help.

Thanks in advance

David