open-discussion > Apply GLM to finger tapping Block-design at subject Level. Doubts
Showing 1-2 of 2 posts
Display:
Results per page:
Feb 6, 2019  01:02 PM | Agustin Rovira
Apply GLM to finger tapping Block-design at subject Level. Doubts
I began my Bachelor Thesis about fnirs and I ran finger tapping experiments using a block-design of 20 repetition with the task of 10 (s) and a rest time of 15 (s)between task. Every time a cue appeared on the screen the subject performed 10 s of finger tapping.

Now, I want to apply a statistical result at subject level. I am trying to apply the GLM as it is described in the following code from the xu cui blog. However, I am struggling with 3 questions.

x - Design Matrix
y - fNIRs Signals
[beta,p,stats] = glmfit(x,y);

beta = b(2:end)'
T = stats.t(2:end)'
p = stats.p(2:end)'

covb = stats.covb(2:end, 2:end);
V = contrast * covb * contrast';
T = (beta * contrast') / sqrt(V) * sqrt(length(x));


  •  Before applying the GLM, it is better pre-processing my signal. Such as, baseline correction, downsampling, band-pass filtering to remove artifacts and lately apply MBL to obtain Hemoglobin concentration change as a time series o it is not necessary the pre-processing before the GLM?
I asked because the papers I saw it do not clarify this point.

  • How properly design the matrix design. I defined it using the following code:
% EXPECTED HRF
t = 1:1:13;
h = gampdf(t,6) + -.5*gampdf(t,10); % HRF MODEL
h = h/max(h); % SCALE HRF TO HAVE MAX AMPLITUDE OF 1
nTRs=7182;
Experiment_time=0:1/9.7:(nTRs-1)/9.7;
impulseTrain0 = zeros(length(Experiment_time),1);
%CUE ONSET
cue=[1270 1567 1865 2163 2461 2759 3056 3354 3652 3950 4248 4546 4843 5141 5439 5737 6035 6332 6630 6928];
% FINGER TAPPING
impulseTrain0(cue)=1;
% EXPERIMENT DESIGN / STIMULUS SEQUENCE
D = [impulseTrain0];
% CREATE DESIGN MATRIX FOR THE THREE STIMULI
X = conv2(D,h'); % X = D * h
X(nTRs+1:end,:) = []; % REMOVE EXCESS FROM CONVOLUTION

  • ┬┐How make up a contrast vector with just one condition? As you notice, my experiment just has one condition(Tapping). so, if I want to compare the condition with the baseline in order to know if the activation is statistical significant how can create a contrast.

Sorry if my questions were too long.

Thanks
Agustin
Feb 7, 2019  04:02 PM | mehrnaz jenabi - mskcc
Apply GLM to finger tapping Block-design at subject Level. Doubts
> Hi Agustin
In subject level your IDEAL file is only numbers of 1 for task and 0 for rest. Depending on the number of volumes that you have and the Tr you can set up your matrix like(000..00111...1111)and then repeat them based on the number of repetition.
Best
Mehrnaz