T value of a single subject

1 min read

I usually report a group-level T-test image in the final publications or presentations. But in the early stage of a project when only one or a few subjects have been scanned, I often need to report an activation map for an individual subject after general linear model analysis (GLM). I could show a beta image or activation image, but a T-image is sometimes desired. The question is how do I calculate the T-value of a contrast for a single subject.

I will use the following example to show how it is calculated. Assume we have two conditions, beep and flash, and the brain signal is saved in y. Based on the timing of beep and flash, we have an independent variable called x with two columns. The 1st column is for beep, the 2nd for flash.

x=rand(10,2);
y=x(:,1)*2 + x(:,2)*3 + 0.2 + rand(size(x(:,1)))/5;
[a,b,c] = glmfit(x,y);

Now you can easily find the beta value, the T value, and the p-value of each individual condition:

beta = a(2:end)'
T = c.t(2:end)'
p = c.p(2:end)'

What about the contrast between beep and flash? Well, it’s a bit more complicated. First, we need to find the covariance matrix of the betas.

covb = c.covb(2:end, 2:end);

Then we define our contrast vector, in this case it is simply contrast = [1 -1]. The variance of contrast (beep-flash) is

V = contrast  * covb * contrast';

The T-value of the contrast is

T = (beta * contrast') / sqrt(V) * sqrt(length(x)); 

Note: you might be tempted to use the two-sample T formula to calculate the T-value (i.e. finding the variance of beta1, variance of beta2, and then calculate). It is not the correct way. We have to consider the case where the two conditions are correlated. Using the covariance matrix above is the right way.


Receive email notification via email
Don't want to miss new papers in your field? Check out Stork we developed:

fNIRS Journal Club 通知 2020/5/29, 11am

546个被试的大型实验是怎么做的?近红外超扫描技术如何揭开群体冲突的神经机制?北京时间2020年5月29日周五上午11点,北京师范大学的马燚娜教授(Yina Ma)将为大家讲解她们组刚刚在Nature Neuroscience发表的文章。 欢迎大家参加并参与讨论。 时间: 北京时间2020年5月29日周五上午11点 地点: https://zoom.com/j/84320310196房间号: 843 2031 0196 密码: 600516 她要讲的文献如下: Within-group synchronization in the prefrontal cortex associates with intergroup conflict....
Xu Cui
7 sec read

fNIRS Journal Club 通知

除了用于测量和诊断,近红外还能用于治疗吗?北京时间2020年5月8日周五上午10点,美国德克萨斯大学刘汉莉和王鑫隆两位教授将为大家讲解他们实验室近年来做的红外对大脑认知改善的研究。 欢迎大家参加并参与讨论。 刘教授大家都知道,在近红外领域如雷贯耳,硕果累累。刘教授组里的王鑫隆教授,年轻有为,已经在近红外光生物调节领域发表十余篇论文。 时间: 北京时间2020年5月8日周五上午10点 地点: https://zoom.com/j/89132075846房间号: 891 3207 5846密码: 716587 他们要讲的3篇文献如下: Interplay between up-regulation of cytochrome-c-oxidase and hemoglobin oxygenation induced by near-infrared laser...
Xu Cui
13 sec read

Functional Near Infrared Spectroscopy (fNIRS): List of manufactures

Contents Company Products Artinis Brite, OxyMon, OctaMon, PortaMon, PortaLite, BIOPAC fNIR 100, fNIR2000M Series 丹阳慧创 NirScan-6000, NirSmart GOWERLABS NTS fNIRS system, LUMO HAMAMATSU NIRO-200NX...
Xiaodan Feng
11 min read

6 Replies to “T value of a single subject”

  1. Hi,Cui Xu. Whether the values of c.t are the T-values of the contrast (beep-baseline or flash-baseline) ?

  2. Sir, Thanks for your wonderful explanation on how to calculate the T-value for an individual subject. My questions is if I assume there are four conditions and I need to find the contrast between these conditions, what would be the contrast vector in this case? Is it [+1 +1 +1 -3]?

  3. Hi Profesor Xu Cui

    I have been following your blog since I began my Bachelor Thesis about fnirs and it has been very insightful to me.
    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 you described here. However, I am struggling with 3 questions.

    – 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

Leave a Reply

Your email address will not be published. Required fields are marked *