Four Groups (Two Factors/Two Levels), One Covariate
This models the input as four separate intercepts and slopes, one for each group. The four groups can be thought of as two levels of a two discrete factors (eg, Gender (Male, Female), Handedness (Left, Right)). There is one continuous covariate (eg, age). So the input for each group is separately modeled as a line with intercept and slope. These results hold only for DODS.
Contents
 FSGD File (g4v1.fsgd)
 Regressors

Contrasts
 Contrast 1 male.rightvsleft.intercept.mtx
 Contrast 2 male.rightvsleft.intercept.mtx
 Contrast 3 malefemale.intercept.mtx
 Contrast 4 malefemale.slope.mtx
 Contrast 5 rightleft.intercept.mtx
 Contrast 6 rightleft.slope.mtx
 Contrast 7 genderxhandedness.intercept.mtx
 Contrast 8 genderxhandednessxage.mtx
 Contrast 8 genderxhandedness.mtx
 mri_glmfit command
FSGD File (g4v1.fsgd)
GroupDescriptorFile 1 Title OSGM Class MaleRight Class MaleLeft Class FemaleRight Class FemaleLeft Variables Age Input subject1 MaleRight 30 Input subject2 MaleLeft 40 Input subject3 FemaleRight 50 Input subject4 FemaleLeft 60
Nclasses = 4
Nvariables = 1
Regressors
NregressorsDODS = Nclasses*(Nvariables+1) = 4*(1+1) = 8
Regressor1: ones for MaleRight subjects, 0 otherwise. Codes intercept for Group 1
Regressor2: ones for MaleLeft subjects, 0 otherwise. Codes intercept for Group 2
Regressor3: ones for FemaleRight subjects, 0 otherwise. Codes intercept for Group 3
Regressor4: ones for FemaleLeft subjects, 0 otherwise. Codes intercept for Group 4
Regressor5: age for MaleRight subjects, 0 otherwise. Codes for Group 1
Regressor6: age for MaleLeft subjects, 0 otherwise. Codes age slope for Group 2
Regressor7: age for FemaleRight subjects, 0 otherwise. Codes age slope for Group 3
Regressor8: age for FemaleLeft subjects, 0 otherwise. Codes age slope for Group 4
Contrasts
The number of columns in each contrast matrix must be the same as the number of regressors (Nregressors). If there is only one row in the contrast matrix, then the result will be a ttest and will have a sign. Reversing the signs in the contrast matrix will only change the sign of the output, not its magnitude. If there is more than one row, the result will be an Ftest and will be unsigned.
Contrast 1 male.rightvsleft.intercept.mtx
Null Hypothesis: is there a difference between the Male Righthanders and Male Lefthanders regressing out the effect of age?
1 1 0 0 0 0 0 0
This is a ttest with MR>ML being positive (red/yellow).
Contrast 2 male.rightvsleft.intercept.mtx
Null Hypothesis: is there a difference between age slopes of the Male Righthanders and Male Lefthanders.
0 0 0 0 1 1 0 0
This is a ttest with MR>ML being positive (red/yellow).
Contrast 3 malefemale.intercept.mtx
Null Hypothesis: is there a difference between Males and Females regressing out the effects of handedness and age?
0.5 0.5 0.5 0.5 0 0 0 0
This is a ttest with M>F being positive (red/yellow). This could also have been [1 1 1 1 0 0 0 0] without effecting the significance. But using 0.5 makes the gamma.mgh output volume have the same scale. Eg, if the input is thickness in mm, then the output will be the mean MF difference in thickness also meausred in mm.
Contrast 4 malefemale.slope.mtx
Null Hypothesis: is there a difference between Male and Female age slope regressing out the effects of handedness?
0 0 0 0 0.5 0.5 0.5 0.5
This is a ttest with M>F being positive (red/yellow). This could also have been [0 0 0 0 1 1 1 1 ] without effecting the significance. But using 0.5 makes the gamma.mgh output volume have the same scale. Eg, if the input is thickness in mm, then the output will be the meausred in mm/years (assuming age is in years).
Contrast 5 rightleft.intercept.mtx
Null Hypothesis: is there a difference between Righties and Lefties regressing out the effects of gender and age?
0.5 0.5 0.5 0.5 0 0 0 0
This is a ttest with R>L being positive (red/yellow). See Contrast 4 for notes on scale.
Contrast 6 rightleft.slope.mtx
Null Hypothesis: is there a difference between the age slope of Righties and Lefties regressing out the effects of gender?
0 0 0 0 0.5 0.5 0.5 0.5
This is a ttest with R>L being positive (red/yellow). See Contrast 4 for notes on scale.
Contrast 7 genderxhandedness.intercept.mtx
Null Hypothesis: is there an interaction between gender and handedness regressing out the effects of age?
0.5 0.5 0.5 0.5 0 0 0 0 0
This is a ttest.
Contrast 8 genderxhandednessxage.mtx
Null Hypothesis: is there an interaction between gender, handedness, and age?
0 0 0 0 0 0.5 0.5 0.5 0.5
This is a ttest.
Contrast 8 genderxhandedness.mtx
Null Hypothesis: is there an interaction between gender and handedness in either intercept or slope?
0.5 0.5 0.5 0.5 0 0 0 0 0 0 0 0 0 0 0.5 0.5 0.5 0.5
This is a Ftest.
mri_glmfit command
This is an example invocation of mri_glmfit. Depending upon your application, you may have other options as well.
mri_glmfit \ glmdir g4v1 \ y y.mgh \ fsgd g4v1.fsgd \ C male.rightvsleft.intercept.mtx \ C male.rightvsleft.intercept.mtx \ C malefemale.intercept.mtx \ C malefemale.slope.mtx \ C rightleft.intercept.mtx \ C rightleft.slope.mtx \ C genderxhandedness.intercept.mtx \ C genderxhandednessxage.mtx \ C genderxhandedness.mtx