Differences between revisions 8 and 9
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
~+'''One Group, One Covariate'''+~ [[FsgdExamples|Back to FSGD Examples]]

~+'''Two Groups (One Factor/Two Levels), One Covariate'''+~

This models the input as a single line (ie, an intercept and a slope).
factor (eg, Age).

<<TableOfContents>>

= FSGD File (g1v1.fsgd) =
{{{
GroupDescriptorFile 1
Title OSGM
Class Main
Variable Age
Input subject1 Main 30
Input subject2 Main 40
}}}

Nclasses = 1 <<BR>>
Nvariables = 1 <<BR>>

= Regressors =

Nregressors = Nclasses*(Nvariables+1) = 1*(1+1) = 2 <<BR>>
Regressor1: All ones. Codes intercept/mean for Main <<BR>>
Regressor2: age for each subject. Codes age slope for Group 1 <<BR>>

= 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 (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
}}}

Back to FSGD Examples

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

This models the input as a single line (ie, an intercept and a slope). factor (eg, Age).

FSGD File (g1v1.fsgd)

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

Nclasses = 1
Nvariables = 1

Regressors

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

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 (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)