## T value of a single subject

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.

Try Stork, a research tool we developed
Stork is a publication alert app developed by us at Stanford. As a researcher we often forget to follow up important publications - and it's practically impossible to search many keywords or researchers' names everyday. Stork can help us to search everyday and notifies us when there are new publications/grants. How Stork helped me? |

About the author: Xu Cui is a human brain research scientist in Stanford University. He lives in the Bay Area in the United States. He is also the founder of Stork (smart publication alert app), PaperBox and BizGenius. He was born in He'nan province, China. He received education in Beijing University(BS), University of Tennessee (Knoxville) (MS), Baylor College of Medicine (PhD) and Stanford University (PostDoc). Read more ... |

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

@Yue Gu

Yes, you can say that

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]?

@Jana

Yes

@Xu Cui

Sir,Thank you!