Author: Doug Greve
This document describes how to perform a paired analysis in FreeSurfer. This includes a two time-point longitudinal analysis in which the same subject was scanned twice with each scan being run through FreeSurfer separately (using the longitudinal stream). It also includes a cross-over analysis in which each subject of a cohort has a matching subject in another cohort. In either case, this describes how to perform statistical tests on the difference between the pairs.
See also RepeatedMeasuresAnova
Contents
Overall Strategy
- Sample each individual's surface onto the average surface.
- Compute the difference between each of the pairs in the average surface space.
- Concatenate the differences into one file.
- Smooth on the surface (optional)
- Perform analysis with mri_glmfit on this file
Steps 1-3 will be performed by one command (mris_preproc), Step 4 by mri_surf2surf, and step 5 by mri_glmfit. Two FSGD files will be required, one for Steps 1-3, and one for Step 5.
Create the First FSGD File
The first FSGD file just needs the subject names of the inputs. The matching pairs must be listed consecutively. You do not need to specify groups or variables at this point (that is needed below) -- you can, it is just not needed. Eg, if you created the file below and called it "pairs.fsgd".
GroupDescriptorFile 1 Class Main Input subject1 Main Input subject1match Main Input subject2 Main Input subject2match Main Input subject3 Main Input subject3match Main Input subject3 Main Input subject3match Main
where subject1match is the match for subject1 (either another time point or a match based on some sort of demographic).
Run mris_preproc
The mris_preproc command will be:
mris_preproc --target fsaverage --hemi lh \ --meas thickness --out lh.paired-diff.thickness.mgh \ --fsgd pairs.fsgd --paired-diff
This peforms Steps 1-3 above, saving the data to lh.paired-diff.thickness.mgh. The key difference between this invocation and a "normal" invocation is the addition of the --paired-diff argument. This tells mris_preproc to compute the difference between the first and second, the third and fourth, etc. This has two implications:
The number of frames in the output file will be half the number of subjects listed in the FSGD file.
The difference is subject-subjectmatch,so positives mean subject > subjectmatch and negatives mean subject < subjectmatch.
Spatially Smooth (optional)
This just spatially smooths by 5mm FWHM. You would do the same thing on a non-paired analysis. The output is lh.paired-diff.thickness.sm05.mgh, which is fed to the next stage.
mri_surf2surf --s fsaverage --hemi lh --fwhm 5\ --sval lh.paired-diff.thickness.mgh \ --tval lh.paired-diff.thickness.sm05.mgh
Create the Second FSGD File
Create the second FSGD file (call it paired-diff.fsgd). This will have one entry per pair. You should include groups and variables here. See the FSGD Examples page for more info.
GroupDescriptorFile 1 Class Main Variables Age Input subject1pair Main 30 Input subject2pair Main 40 Input subject3pair Main 50 Input subject4pair Main 60
Notes:
The groups and variables are assigned to a pair. Eg, above subject1pair is assigned an Age of 30. You need to make sure that this makes sense.
The subject name associated with the Input does not need to exist in the FreeSurfer $SUBJECTS_DIR tree.
The total number of Inputs will be half that in the first FSGD file (pairs.fsgd), which will match the number of frames in the file created by mris_preproc.
Create Contrasts
Contrast 1 (mean.mtx)
Null Hypothesis: does the mean paired difference differ from 0, regressing out the effect of age?
1 0
This will be a t-test. Positive values mean that the mean subject > the mean subjectmatch.
Contrast 2 (age.mtx)
Null Hypothesis: does the correlation between the paired difference and age differ from 0?
0 1
This will be a t-test. Positive values mean that the mean subject > the mean subjectmatch.
Run mri_glmfit
Note: you may have more options than are listed below, depending on your application.
mri_glmfit \ --glmdir lh.paired-diff \ --y lh.paired-diff.thickness.sm05.mgh \ --fsgd paired-diff.fsgd \ --C mean.mtx \ --C age.mtx
Note: if conducting a one-sample group-mean test, then include the flag --osgm, and don't include any contrasts. Also, the 'age' regressor would not need to be included in the second fsgd file.