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