Contrasts and group level analysis - sjgershm/ccnl-fmri GitHub Wiki

Once the model has been fitted, you can construct contrasts. For example, suppose you had two conditions (A and B). You can construct a contrast for activations that are greater in A than in B by calling:

ccnl_fmri_con(EXPT,model,contrasts,subjects)

where contrasts is a cell array containing the set of contrasts to construct. This uses a very simple syntax:

  • 'A - B' means condition A minus condition B.
  • 'A' means the simple effect of A.

So in the example above you would use contrasts = {'A - B'}.

After the contrast image has been constructed for each subject, ccnl_fmri_con automatically enters the contrast into a second-level (group) analysis, resulting in a t-statistic map for each contrast. These maps are numbered (e.g., spmT0001.nii) according to the order in the contrast cell array. The group-level contrast results will be stored in separate folders (con1, con2, etc.).

For reference, a contrasts.mat file will be saved in the group-level model directory with two variables:

  • contrasts: a cell array of contrast names
  • convec: a matrix where each row corresponds to a contrast and each column to a regressor in the design matrix, with values of 1 and -1 specifying each contrast.