A Reader Writes: Basic FMRI Questions

Mine's bigger

I recently received an email with some relatively basic questions about FMRI, and both the question and answers might apply to some of you. Admittedly, I am not 100% sure about the weighting of the regressors for the ANOVA, but I think it's pretty close. Whatever, man; I'm union.

Some of the words have been changed to protect the identity of the author.

Dear Andrew,
Thanks for your message. My background is in medicine and I am trying  to do fmri research!
I will be grateful for your help: 
1. How do you interpret the results of the higher and first level fsl analysis - I am used to p values and Confidence intervals - are fMRI results read in a similar way?
2. Importantly- I have a series of subjects and we are interested to look at effect of [a manipulation] on their response to [cat images] over one year, we have four time points one before the operation and three after. These time points are roughly 4 months apart.
Our Idea was to see how the response to [cat images] changes over time- with each subject serving as their own control- How do I analyse that? We have some missing time points as well- subjects did not come for all the time points!
Simon Legree
Hi Simon,
Congratulations on your foray into FMRI research; I wish you the best of luck, and I hope you find it enjoyable and rewarding!
In response to your questions:
1. FMRI results also use p-values and confidence intervals, but these are calculated at every single voxel in the brain. For example, if you are looking at the average BOLD response to [cat images] at each voxel, a parameter will be estimated at that voxel, along with a particular p-value and confidence interval. What you'll notice in the FSL GUI is a cluster thresholding which will only display a specified number of spatially contiguous voxels all passing the same p-threshold.
One crucial difference between first and higher-level analyses in FSL (and any FMRI analysis, really) is the degrees of freedom. At the first-level, the degrees of freedom is specified as the number of time points minus the number of regressors; at the second-level (or higher level) the degrees of freedom is specified as the number of time points that went into that higher-level analysis - which is usually the number of subjects included in the analysis. Unless you are doing a case study, you usually will not be dealing with the degrees of freedom at the individual level. (However, see documentation on mixed-effect analyses like AFNI's 3dMEMA, which will take individual variance and degrees of freedom into account.)
2. For an analysis with each patient serving as their own control, you would probably want to do a paired t-test or repeated-measures ANOVA for each subject. For the paired t-test, you would need to weight each cluster of regressors so that they sum to +1 and -1, respectively; in your case, +1*Before, -0.33*After1, -0.33*After2, -0.33*After3. However, if you hypothesize that there is a linear response over time, you might want to do an ANOVA and weight the timepoints linearly; e.g., for a decreasing response over time, +0.66*Before, +0.33*After1, -0.33*After2, -0.66*After3. There are a number of different ways you could do this. As for the subjects with missing time points, you would need to take that into account when weighting your regressors; I also recommend doing a sanity check by doing the analysis both with the timepoint-less subjects and with them. If there is a huge discrepancy between the two analyses, it might suggest that there is something else correlated with missing time points.

Hope this helps!

Creating Spherical ROIs in AFNI Using 3dUndump

Regions of interest; everybody wants them, but nobody knows how to get them. However, as Megatron once said, power flows to the one who knows how; desire alone is not enough.

Aware of this, I have created a script which will disenthrall you from the pit of ignorance and give you the power to create ROIs just about anywhere you please. The script uses AFNI's 3dUndump, which creates a spherical ROI of a given radius from which parameter values can be extracted using a tool like 3dmaskdump. The rationale is similar to creating ROIs using fslmaths or SPM's marsbar; and if you understand those, using 3dUndump is essentially the same thing.

The only caveat is that you must know the orientation of your dataset before using 3dUndump. AFNI defaults to RAI orientation, in which numbers increase from right to left, anterior to posterior, and inferior to superior; in other words, coordinates to the right of the origin will be negative (since numbers decrease going from left to right), and coordinates anterior to the origin will be negative (since numbers again decrease going from posterior to anterior). Always make sure to check the orientation using a command like 3dinfo -orient before creating your ROI, or open up your anatomical dataset in the AFNI viewer and navigate to the location that you want (e.g., right nucleus accumbens) and then write down the coordinates displayed in the upper left corner of the viewer. You can also use the option -orient LPI, if you're using coordinates from a paper.

This Python script that will let you input the coordinates, and then output a dataset ROI that can be overlaid on your anatomical image. The script can be found here.

Tutorial on 3dUndump:

Tutorial on MakeSpheres.py

Let's Talk about Masks (Live Video)

I've been experimenting more with Camtasia, and I've uploaded a new video showing how masks are drawn on an actual human, rubber brain, which involves the use of R studio, Excel, and colored pens. My hope is that this makes the learning experience more interactive; in addition, you get to see what my mug looks like.