Differences between revisions 6 and 7
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
1. Intercept of Male
2. Intercept of Female
3. Age Slope
1. Intercept of Male [[BR]]
2. Intercept of Female [[BR]]
3. Age Slope [[BR]]
Line 16: Line 16:
1. Intercept of Male
2. Intercept of Female
3. Age Slope (male)
4. Age Slope (female)
1. Intercept of Male [[BR]]
2. Intercept of Female [[BR]]
3. Age Slope (male) [[BR]]
4. Age Slope (female) [[BR]]
Line 23: Line 23:
To use this in your mri_glmfit command create a file that contains just the one line of your contrast vector using the text editor of your choice. Again, using an appropriate naming convention is a good idea. Make sure this contrast vector has been created for you and is called '''age.mat''':
{{{
cd $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs/group_analysis_tutorial/stats
cat age.mat
}}}
Create age.mat if it does not exist. It should contain this line:
{{{
0 0 1
}}}

As an additional exercise, try constructing the contrast vector for testing the same data for difference between males and females independent of age. [wiki:Self:FsTutorial/MaleFemaleContrastSolution Click here for the answer.]

[wiki:FsTutorial top] | [wiki:FsTutorial/GroupAnalysis previous]

  • To follow this exercise exactly be sure you've downloaded the [wiki:FsTutorial/Data tutorial data set] before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names.

Specify contrast vectors to test hypotheses

For the example described [wiki:FsTutorial/CorrectFsgdFile here] there were two classes (male, female) and one variable (age). The 3 regressors in the design matrix, when using DOSS, will be:

1. Intercept of Male BR 2. Intercept of Female BR 3. Age Slope BR

Your contrast vector can be set up, using these regressors, to make any comparisons you'd want. If you wanted to compare the thickness differences between Males and Females, while regressing out age you could use a contrast vector [1 -1 0]. If you wanted to make a direct comparison between thickness and age, regardless of gender, you could use the contrast vector [0 0 1].

If you are using DODS there will be 4 regressors in the design matrix:

1. Intercept of Male BR 2. Intercept of Female BR 3. Age Slope (male) BR 4. Age Slope (female) BR

Your contrast vector can be set up, using these regressors, to make any comparisons you'd want. If you wanted to compare the thickness differences between Males and Females, while regressing out age you could use a contrast vector [1 -1 0 0]. If you wanted to make a direct comparison between thickness and age between class, you could use the contrast vector [0 0 1 -1].

FsTutorial/CreateContrastVectors (last edited 2008-04-29 11:46:15 by localhost)