Back to FSGD Examples

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.

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 t-test 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 F-test and will be unsigned.

Contrast 1 male.right-vs-left.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 t-test with MR>ML being positive (red/yellow).

Contrast 2 male.right-vs-left.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 t-test with MR>ML being positive (red/yellow).

Contrast 3 male-female.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 t-test 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 male-female.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 t-test 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 right-left.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 t-test with R>L being positive (red/yellow). See Contrast 4 for notes on scale.

Contrast 6 right-left.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 t-test with R>L being positive (red/yellow). See Contrast 4 for notes on scale.

Contrast 7 gender-x-handedness.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

This is a t-test.

Contrast 8 gender-x-handedness-x-age.mtx

Null Hypothesis: is there an interaction between gender, handedness, and age?

0 0 0 0 0.5 -0.5 -0.5 0.5

This is a t-test.

Contrast 8 gender-x-handedness.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 F-test.

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.right-vs-left.intercept.mtx \
  --C male.right-vs-left.intercept.mtx \
  --C male-female.intercept.mtx \
  --C male-female.slope.mtx \
  --C right-left.intercept.mtx \
  --C right-left.slope.mtx \
  --C gender-x-handedness.intercept.mtx \
  --C gender-x-handedness-x-age.mtx \
  --C gender-x-handedness.mtx

Fsgdf4G1V (last edited 2011-01-18 13:50:36 by tanha)