SpmPlottingAdjustedData - MRC CBU Imaging Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Type the odd characters out in each group: abz2a 125t7 HhHaHh year.s 5433r21 worl3d

location: SpmPlottingAdjustedData

Plots and adjusted data in SPM99

Getting adjusted data from SPM99

  1. Click on Results. Select a contrast that will show you the voxel you are interested in
  2. After you have the SPM in the graphics window, select the voxel you are interested in, either by clicking on the voxel, or typing the coordinate in the box in the lower left window
  3. Click on Plot, in the lower left window.
  4. Select "contrast of parameter estimates" from the menu offered
  5. In the contrast manager, select an F contrast that has a row specifying each of the columns that are of interest. For example, let us say that you have done a simple PET experiment with four conditions, and no covariates of interest. In that case, the default F contrast - "effects of interest" uses only the condition columns of the design matrix, and selecting this contrast here will give you data adjusted for the other effects, such as global effects, and subject effects.
  6. There is now a variable "y" in the matlab workspace. This contains the data adjusted for the effects of no interest.
  7. If you want to save this for further use, you can type

save y y
  • in the matlab window, to save the y variable as a matlab .mat file called y.mat, or

save y.dat y -ascii
  • to save as a text file. The text file can be loaded into other programs for plotting, statistics etc, or back into matlab with

load y.dat
  • (which will recreate the variable "y" in the workspace), or

y = spm_load('y.dat')

Doing nice SPM96-like plots by condition in SPM99

Often, in a PET experiment, we have, say, four conditions. In that case, the plots PET people like, in SPM96, are bar graphs of the signal level for each condition, with the scatter plotted for each condition. These are not so straighforward to get with SPM99. Here's what you do: 1. Click on Results. Select a contrast that will show you the voxel you are interested in

  1. After you have the SPM in the graphics window, select the voxel you are interested in, either by clicking on the voxel, or typing the coordinate in the box in the lower left window
  2. Click on Plot, in the lower left window.
  3. Select "contrast of parameter estimates" from the menu offered
  4. In the contrast manager, select an F contrast that has one row for each of the conditions. If you have got no covariates of interest, then the default F contrast - "effects of interest" is exactly what you want. If not, then you will have to make a new F contrast, with one row for each condition. Don't forget, the numbers in the row have to sum to zero to make it a valid F contrast, so, if you had four conditions, a valid F contrast for the four conditions would be:

3 -1 -1 -1
      -1 3 -1 -1
      -1 -1 3 -1
      -1 -1 -1 3
  • If you select - or make - such a contrast, you will get a plot, with one bar for each row in the contrast - in this case one bar for each condition, and a line on top of each bar showing the standard error for each condition. Matthew Brett 18/11/99