Index TableOfContents

Name

stxgrinder-sess - compute contrasts based on GeneralLinearModel

Synopsis

stxgrinder-sess - ??

Arguments

Required Flagged Arguments

??

Optional Flagged Arguments

-a <analysisname>

session-level functional analysis name

Analysis as created by ["mkanalysis-sess.new"] and computed by selxavg-sess

-c <contrast> [<-c contrast>]

contrasts

-all

compute all contrasts for given analysis

-space <spacename>

space in which to average (native, tal, sph)

-spacedir <spacedir>

space directory (default spacename)

-hemi <hemisphere>

with sph space <lh rh>

-fdofmax <dofmax>

max dof for F-test

-sf <sessidfile>

...

-df <srchdirfile>

...

-s <sessid>

...

-d <srchdir>

...

-help

-umask <umask>

set unix file permission mask

-version

print version and exit

Outputs

ces

Contrast Effect Size = C*bhat

cespct

ces expressed as a percentage of mean baseline

cesvar

variance of ces

t

t-ratio

sig

significance based on t-test

f

f-ratio (when J>1)

fsig

significance based on F-test (when J>1)

minsig

best significance, boferroni corrected (when J>1)

iminsig

index of best significance (when J>1)

Description

General

FsFast utility to compute contrasts for testing hypotheses based on a GeneralLinearModel (GLM), including t and F statistics, significances of those statistics, and contrast effects sizes (ces).

Algorithm

All the contrast outputs will be found in sess/analysis/contrast (for native space) or sess/analysis/spacedir/contrast (for resampled). Note: the significances are stored as -log10(p).

This program uses a univariate general linear model to compute the contrasts:

y = X*b + n

where y is the raw data vector, X is the design matrix (the columns of which are regressors), b is the vector of model parameters (regression coefficients), and n noise. The noise is need not be white, but white will be assumed for this discussion.

The best estimate of b is bhat = inv(X'*X)*X'*y, with residual variance r = y - X*bhat. The residual variance is rvar = r'r/DOF, where DOF is the number of rows of X minus the number of columns. bhat and rvar are computed by selxavg-sess; both are stored in the h volume. The X matrix can be found in the session-level analysis directory in X.mat.

A contrast matrix C is a matrix with number of columns equal to the number of columns in X. The contrast matrix is created by mkcontrast-sess and can be found the the project-level analysis directory (files with .mat). C can have any number of rows J. The contrast effect size (CES) is then ces = C*bhat. The CES is saved in the volume called ces. Note: there is also a volume called cespct which is the CES as a percent of the mean functional value.

When J=1 (ie, there is only one row in C), the variance of the ces is cesvar = rvar * (C * inv(X'*X) *C'). A t-statistic is formed by t = ces/sqrt(cesvar), and the significance is computed. The result is stored in volumes called t and sig, respectively.

When J>1 (ie, there multiple row in C), several things are done. First, an F-ratio is computed as F = ces'*inv(C*inv(X'*X)*C')*ces/(J*rvar); the signfificance of this ratio is also compued. The result is stored in volumes called f and fsig, respectively. Second, a separate t-test of performed for each row of C as described above; all results are still stored in the t and sig volumes, but these volumes will have J frames. Finally, the best (smallest) significance within the J significances computed at a voxel is stored in minsig (after multiplication by J as a bonferroni correction). The row as which the min sig was found is stored in iminsig.

Note: the significances are stored as -log10(p). For t-tests, the signifiance is given the same sign as the t-value.

Notes

The significances are stored as -log10(p).

For t-tests, the signifiance is given the same sign as the t-value.

For F-tests, the signifiance is not given a sign. This is the only difference with stxgrinder-sess.

t-test is not saved when contrast is omnibus or zomnibus

An "old" version of stxgrinder-sess is available as ["stxgrinder0-sess"].

Examples

Example 1

??

Example 2

??

Bugs

The program occasionally hangs when performing the F-test. This is caused when the DOF is very large (eg, > 1000). This ofen happens when analyzing group fixed effects. If the program appears to hang, reduce FtestDOFMax with -fdofmax until it seems to run ok. You can also just skip the F-test with -noftest.

See Also

["othercommand1"], ["othercommand2"]

Links

FreeSurfer, FsFast

Methods Description

description
description

References

["References/Lastname###"]

Reporting Bugs

Report bugs to <analysis-bugs@nmr.mgh.harvard.edu>

Author/s

JaneSmith