Where gamma represents the contrast vector (in this example, [1 -1]) and B-hat represents the beta estimates for each condition. The degrees of freedom for a single-subject analysis is based on the number of time points; although, since nearby timepoints share a high degree of correlation, the actual degrees of freedom is pared down to compensate. With most standard processing streams, the variance associated with a beta estimate is discarded when carried to a higher-level analysis, although programs such as FSL's FLAME and AFNI's 3dMEMA take this variance into account when weighting group-level estimates.
Details about how to perform a simple t-contrast in SPM are shown in the following video. The first twenty seconds or so is an outtake where my microphone fell over; we sure like to have fun around here!
Is there way to quickly compute temporal SNR in SPM?
ReplyDeleteHey there,
DeleteI haven't tried computing temporal SNR in SPM before, but you could probably use imcalc to do the following:
1. Take the average of the signal of your warped and scaled data;
2. Calculate the standard deviation of the data;
3. Divide Step 1 by Step 2;
4. Multiply the result of Step 3 by a mask, if you want.
Note that in AFNI they recommend taking the standard deviation of the error time series, which I believe it analogous to the ResMS.nii file created after estimating a GLM. I'm not positive about that, however...
-Andy
Thanks for your reply, Andy! By reading your comment, I have just realized that I need the contrast to noise ratio, not the the tSNR :) Do you know how to compute the CNR in SPM?
DeleteIf you want the CNR of tissue types, then you could take the difference of the mean intensity of the gray matter and white matter, and divide it by the standard deviation of voxels outside the brain. For CNR of the signal, you could take a contrast map and divide that by the standard deviation of the ResMS.nii file. I'm not 100% sure of this approach, but that's my best guess. See this article for more information: http://onlinelibrary.wiley.com/store/10.1002/jmri.20935/asset/20935_ftp.pdf;jsessionid=C95EFA680F898A1FCC32A6BB0F62C19A.f02t03?v=1&t=iwm816t0&s=4b324eafd8ff23a367e69ab3b930bc3fd043a121
DeleteBest,
-Andy
Hi Andy,
ReplyDeleteI want to automise contrasts using SPM (for individual analysis) but don't have TASKS on the toolbar (like you have in your tutorial). Can you walk me through that process or refer me to a website that explains that?
Many thanks,
Rubina