One Group (One Factor), Two Covariates

This models the input with a single offset for the group with two slopes, one for each covariate/continuous factor (eg, Age and Weight). DODS and DOSS will give the same results.

# FSGD File (g1v2.fsgd)

```GroupDescriptorFile 1
Title G1V2
Class Main
Variables Age Weight
Input subject1 Main 30 100
Input subject2 Main 40 120```

Nclasses = 1
Nvariables = 2

# Regressors (DODS)

Nregressors = Nclasses*(Nvariables+1) = 1*(2+1) = 3 (DODS and DOSS)
Regressor1: All ones. Codes intercept/mean for Main
Regressor2: age for each subject. Codes age slope for Main
Regressor3: weight for each subject. Codes age slope for Main

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

Null Hypothesis: the intercept/offset is different than 0 after regressing out the effects of age and weight.

`1 0 0`

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

## Contrast 2 age.mtx

`0 1 0`

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

## Contrast 3 weight.mtx

`0 0 1`

This is a t-test with the age 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 g1v2 \
--y y.mgh \
--fsgd g1v2.fsgd \
--C main.mtx \
--C age.mtx \
--C weight.mtx ```

Fsgdf1G2V (last edited 2012-07-03 15:56:18 by tanha)