Back to FSGD Examples

Six Groups (Two Factors/Three Levels), No Covariates

This models the input as six separate intercepts/means/offsets, one for each group. The six groups groups can be thought of as three levels of a two discrete factors (eg, Gender (Male, Female), Handedness (Left, Right, Ambidextrous)). There are not continuous covariates. These results hold only for DODS or DOSS.

FSGD File (g6v0.fsgd)

GroupDescriptorFile 1
Title OSGM
Class MaleRight
Class MaleLeft
Class MaleAmbi
Class FemaleRight
Class FemaleLeft
Class FemaleAmbi

Nclasses = 6
Nvariables = 0

Regressors

NregressorsDODS = Nclasses*(Nvariables+1) = 6*(0+1) = 6
NregressorsDOSS = Nclasses + Nvariables = 6 + 0 = 6
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 MaleAmbi subjects, 0 otherwise. Codes intercept for Group 3
Regressor4: ones for FemaleRight subjects, 0 otherwise. Codes intercept for Group 4
Regressor5: ones for FemaleLeft subjects, 0 otherwise. Codes intercept for Group 5
Regressor6: ones for FemaleAmbi subjects, 0 otherwise. Codes intercept for Group 6

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.mtx

Null Hypothesis: is there a difference between the Male Righthanders and Male Lefthanders?

1 -1 0 0 0 0

This is a t-test with MR>ML being positive (red/yellow).

Contrast 2 male.right-vs-ambi.mtx

Null Hypothesis: is there a difference between the Male Righthanders and Male Ambidextrous?

1 0 -1 0 0 0

This is a t-test with MR>ML being positive (red/yellow).

Contrast 3 female.right-vs-ambi.mtx

Null Hypothesis: is there a difference between the Female Righthanders and Female Ambidextrous?

0 0 0 1 0 -1

This is a t-test with MR>ML being positive (red/yellow).

Contrast 4 male-female.mtx

Null Hypothesis: is there a difference between Males and Females regressing out the effects of handedness?

0.5 0.5 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 [1 1 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 mean MF difference in thickness also meausred in mm.

Contrast 5 right-left.mtx

Null Hypothesis: is there a difference between Righties and Lefties regressing out the effects of gender?

0.5 -0.5 0 0.5 -0.5 0

This is a t-test with R>L being positive (red/yellow). See Contrast 4 for notes on scale.

Contrast 6 gender-x-handedness.mtx

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

0.5 -0.5 -0.5 0.5 0.0 0.0  0.0  0.0 0.0
0.0  0.0  0.0 0.0 0.0 0.5 -0.5 -0.5 0.5

This is an 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 g6v0 \
  --y y.mgh \
  --fsgd g6v0.fsgd \
  --C male.right-vs-left.mtx \
  --C male.right-vs-ambi.mtx \
  --C female.right-vs-ambi.mtx \
  --C male-female.mtx \
  --C right-left.mtx \
  --C gender-x-handedness.mtx