TestPage - MRC CBU Imaging Wiki

Revision 4 as of 2006-08-11 14:10:59

Clear message
location: TestPage

Introduction to SPM statistics

TableOfContents()

This page is a basic introduction to the statistics in SPM. It refers to SPM versions 96 and 99 The page is designed for readers who have had very little formal statistical background, and I have tried to keep formulae to a minimum. You will not need any knowledge of the matlab programming language to understand the page, but if you do know matlab then you will probably want to refer to the code that I have used to create the figures. The code is contained in the http://imaging.mrc-cbu.cam.ac.uk/scripts/statstalk.m script, and contains several example pieces of code for obtaining and analysing image data. There are instructions in the script on the steps you will need to follow to allow you to run it.

Introduction

The statistics interface to SPM, it should be said, is not easy to understand for the first-time user. This fact is more surprising than it may seem, because SPM uses much of the same underlying maths as many other statistics packages, such as SPSS. The reason that the statistical interface to SPM is so much harder to understand is that SPM chooses to take the user much closer to the maths; it sacrifices ease of understanding for enormous flexiblity of the designs that can be analysed with the same interface. To understand the SPM interface, you will need some understanding of the underlying maths. I hope to show that this need not be an insurmountable task, even for the relative statistical novice.To start, it is important to point out that SPM creates statistics by doing a seperate statistical analysis for each voxel. Like most other functional imaging programs, SPM analyses each voxel independently. Specifically, it:

  1. does an analysis of variance separately at each voxel;

  2. makes t statistics from the results of this analysis, for each voxel;
  3. works out a Z score equivalent for the t statistic;
  4. shows you an image of the t statistics (SPM99), or equivalent Z scores (SPM96);
  5. suggests a correction to the significance of the t statistics (SPM99) or Z scores (SPM96) which takes account of the multiple comparisons in the image.

This document tries to explain how steps 1 to 4 work. I have written a separate tutorial on [wiki:PrinciplesMultipleComparisons Random Field Theory] which describes the basics of step 5.

Before continuing, it is worth re-stressing that SPM does an analysis of variance at each voxel entirely independently, in order to make its t statistics (and Z scores). The statistics it uses to do this are fairly straightforward, and can be found in most statistics textbooks.

Naming of parts

This section goes through the standard statistical terms for an analysis, and how they relate to an analysis in SPM.

The response variable in statistics is some measured data for each observation. A response variable is often referred to as dependent variable. In the case of SPM, the response variable is made up of all the values from an individual voxel for each of the scans in the analysis.

The predictor variable contains some value used to predict the data in the response variable. A predictor variable may also be called an independent variable. Each variable contains a possible effect. In our case a predictor variable might be some covariate such as task difficulty which is known for each scan, and which might influence the response variable - in our case, voxel values.

Thus, in SPM:

observation = a voxel value, in the voxel we are analysing, for one scan;

response variable = data for all the scans for one voxel (i.e. all the observations);

predictor variable = covariate = effect.

PET and fMRI

The example I will be using for this page is a single subject PET analysis. This is because a PET analysis is a little simpler than a typical within subject fMRI analysis. One reason that PET data are simpler than fMRI is that, for PET, the observations (voxel values) are nearly independent. By this I mean that the signal that generated the voxel value (VV) for one scan has more or less decayed to negligible levels by the time of the next scan. Thus the VV from the second scan is a measure of the signal at that voxel that is independent of the VV from the first scan. The same is true in analyses that have a different image for each subject, as is often the case for random effect analyses. However, for fMRI scans within a scan session, the spacing between scans is often very short. In this case the signal that generated one scan may still be present at the time of the next. This means that time-series approaches must be used with these data, which complicates the maths. However, the underlying principles that I describe here for PET also apply to fMRI.

An example analysis in SPM

Here is some output from an analysis in SPM96. This analysis will provide the example data for the explanations below:

ImageLink(http://imaging.mrc-cbu.cam.ac.uk/images/spm96sample.gif,http://imaging.mrc-cbu.cam.ac.uk/pdfs/spm96sample.pdf,alt=Click here to view page in pdf format)