Back to FSGD Examples

One Group, One Covariate

This models the input as a single line (ie, an intercept and a slope). factor (eg, Age). Because there is only one group, this will be the same for both DODS and DOSS.

FSGD File (g1v1.fsgd)

GroupDescriptorFile 1
Title OSGM
Class Main
Variables Age
Input subject1 Main 30
Input subject2 Main 40

Nclasses = 1
Nvariables = 1


NregressorsDODS = Nclasses*(Nvariables+1) = 1*(1+1) = 2
NregressorsDOSS = Nclassesd + Nvariables = 1+1 = 2
Regressor1: All ones. Codes intercept/mean for Main
Regressor2: age for each subject. Codes age slope for Group 1


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 (intercept.mtx)

Null Hypothesis: is the intercept equal to 0?

1 0

This is a t-test with the intercept>0 being positive (red/yellow).

Contrast 2 (slope.mtx)

Null Hypothesis: is the slope equal to 0?

0 1

This is a t-test with the slope>0 being positive (red/yellow).

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 g1v1 \
  --y y.mgh \
  --fsgd g1v1.fsgd \
  --C intercept.mtx \
  --C slope.mtx

Fsgdf1G1V (last edited 2010-09-20 15:10:27 by MartinReuter)