Differences between revisions 3 and 6 (spanning 3 versions)
Revision 3 as of 2008-12-02 16:53:29
Size: 2475
Editor: crash
Comment:
Revision 6 as of 2008-12-02 18:51:21
Size: 3041
Editor: crash
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Two Groups (One Factor/Two Levels), One Covariates ~+'''Two Groups (One Factor/Two Levels), One Covariates'''+~
Line 3: Line 3:
This models the input as two lines. If DODS, then each line has its
own intercept and slope. If DOSS, then each line has its
own intercept but they share a slope.
This models the input as two separate lines (DODS), one for each
group. The two groups can be thought of as two levels of a single
discrete factor. The covariate can be thought of as a continuous
factor (eg, Age).
Line 7: Line 8:
FSGD File: example3.fsgd <<TableOfContents>>

= FSGD File (g2v1.fsgd) =
Line 18: Line 21:
Nclasses = 2<<BR>>
Nvariables = 1<<BR>>
Nclasses = 2 <<BR>>
Nvariables = 1 <<BR>>
Line 21: Line 24:
--------------------------------------------------------------------------------------
DODS
Regressors: <<BR>>
= Regressors (DODS) =
Line 30: Line 32:
Contrasts: = Contrasts =
Line 32: Line 34:
Contrast1: ------------ 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 ==
Line 40: Line 49:
Since this is a t-test, the output will be signed, with Group1>Group2
being positive (red/yellow). Reversing the sign will only change the
sign of the output, not its magnitude.
This is a t-test with Group1>Group2 being positive (red/yellow).
Line 44: Line 51:
Contrast2: <<br>> == Contrast 2 ==
Line 55: Line 62:
Since this is a t-test, the output will be signed, with Group1>Group2
being positive (red/yellow). Reversing the sign will only change the
sign of the output, not its magnitude.
This is a t-test with Group1>Group2 being positive (red/yellow).
Line 59: Line 64:
Contrast3: ------------ == Contrast 3 ==
Line 63: Line 68:
--------------- cut here -------------- {{{
Line 66: Line 71:
--------------- cut here --------------
Note: this is an F-test (and hence unsigned).
}}}
Note: this is an F-test (and hence unsigned). Reversing the signs will
have no effect.
Line 69: Line 75:
Contrast4:  ------------ == Contrast 4 ==
Line 73: Line 79:
--------------- cut here -------------- {{{
Line 75: Line 81:
--------------- cut here -------------- }}}
Line 77: Line 83:
Contrast5: ------------ This is a t-test with (Group1+Group2)/2 > 0 being positive
(red/yellow). If the mean is < 0, then it will be displayed in
blue/cyan.

== Contrast 5 ==
Line 80: Line 90:
Contrast File: g1g2.intercept.mtx
--------------- cut here --------------
Contrast File: g1g2.slope.mtx
{{{
Line 83: Line 93:
--------------- cut here -------------- }}}

This is a t-test with (Group1+Group2)/2 > 0 being positive
(red/yellow). If the mean is < 0, then it will be displayed in
blue/cyan.

= 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 g2v1 \
  --y y.mgh \
  --fsgd g2v1.fsgd \
  --C g1-g2.slope.mtx \
  --C g1-vs-g2.mtx \
  --C g1g2.intercept.mtx \
  --C g1g2.slope.mtx
}}}

Two Groups (One Factor/Two Levels), One Covariates

This models the input as two separate lines (DODS), one for each group. The two groups can be thought of as two levels of a single discrete factor. The covariate can be thought of as a continuous factor (eg, Age).

FSGD File (g2v1.fsgd)

GroupDescriptorFile 1
Title OSGM
Class Group1
Class Group2
Variable Age
Input subject1 Group1 30
Input subject2 Group2 40

Nclasses = 2
Nvariables = 1

Regressors (DODS)

Nregressors = Nclasses*(Nvariables+1) = 2*(1+1) = 4
Regressor1: ones for subjects in Group 1, 0 otherwise. Codes intercept/mean for Group 1
Regressor2: ones for subjects in Group 2, 0 otherwise. Codes intercept/mean for Group 2
Regressor3: age for subjects in Group 1, 0 otherwise. Codes age slope for Group 1
Regressor4: age for subjects in Group 2, 0 otherwise. Codes age slope for Group 2

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

Null Hypothesis: is there a difference between the group intercepts?

Contrast File: g1-g2.intercept.mtx

1 -1 0 0

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

Contrast 2

Null Hypothesis: is there a difference between the group slopes? Note: this is an interaction between group and age. Note: not possible to test with DOSS

Contrast File: g1-g2.slope.mtx

0 0 1 -1

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

Contrast 3

Null Hypothesis: does Group1 differ from Group2 in intercept or slope?

Contrast File: g1-vs-g2.mtx

1 -1 0  0
0  0 1 -1 

Note: this is an F-test (and hence unsigned). Reversing the signs will have no effect.

Contrast 4

Null Hypothesis: does mean of group intercepts differ from 0?

Contrast File: g1g2.intercept.mtx

0.5 0.5 0 0

This is a t-test with (Group1+Group2)/2 > 0 being positive (red/yellow). If the mean is < 0, then it will be displayed in blue/cyan.

Contrast 5

Null Hypothesis: does mean of group slopes differ from 0?

Contrast File: g1g2.slope.mtx

0 0 0.5 0.5

This is a t-test with (Group1+Group2)/2 > 0 being positive (red/yellow). If the mean is < 0, then it will be displayed in blue/cyan.

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 g2v1 \
  --y y.mgh \
  --fsgd g2v1.fsgd \
  --C g1-g2.slope.mtx \
  --C g1-vs-g2.mtx \
  --C g1g2.intercept.mtx \
  --C g1g2.slope.mtx

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