39
Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Embed Size (px)

Citation preview

Page 1: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Contrasts (a revision of t and F contrasts by a very

dummyish Martha)

& Basis Functions (by a much less dummyish Iroise!)

Page 2: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Outline

• Contrasts– What do contrasts do?– t contrasts (with SPM example)– F contrasts

• Basis Functions– What’s a basis?– Basis functions in SPM– Example of contrasts with basis functions

Page 3: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

What do contrasts do?• GLM characterises relationships between our

experimental manipulations and the observed data - multiple effects all within the same design matrix.

• So to focus in on a particular characteristic, condition, or regressor we use contrasts…

• t-tests: tell us whether there is a significant increase or decrease in the contrast specified

• F-tests: tell us whether there is a significant difference between the conditions in the contrast (the effect of a group of regressors)

Page 4: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

A new example!

See 2003 and 2004 presentations for the first (very good) example from Chapter 8 HBF. This is for a change…

• Two event related conditions

• The subject presses a button with either their left or right hand depending on a visual instruction

• We are interested in finding the brain regions that respond more to left than right motor movement

Page 5: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

t contrasts

To find the brain regions corresponding more to left than right motor responses we use the contrast:

T = [1 -1 0]

Left Right Mean

Page 6: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

t contrasts• A one dimensional contrast

T =

contrast ofestimated

parameters

varianceestimate

T =

ss22c’(X’X)c’(X’X)++cc

c’bc’b

So, for a contrast in our model of 1 -1 0:

T = (ß1x1 + ß2x-1 + ß3x 0) Estimated variance

Page 7: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Left motor responses...

This shows activation of the contralateral motor cortex, ipsilateral cerebellum etc

Page 8: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

So how do I do that in SPM?

Page 9: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
Page 10: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
Page 11: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
Page 12: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
Page 13: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
Page 14: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

t contrasts

To find the brain regions corresponding more to trials than time between trials (which would presumably give visual areas?) you could either:

1) create a new model with one regressor for responses (right and left) [1 0]

2) or do a conjunction of [1 0 0] and [0 1 0] on the existing model to look for common areas of activation

Page 15: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

F contrasts

• T contrasts are directional

• To test for the overall difference (positive or negative) between left and right responses compared to baseline we use:

[ 1 0 0

0 1 0 ]

Left Right Mean

Page 16: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

F-test

• To test a hypothesis about general effects, independent of the direction of the contrast

• A collection of t contrasts that you want to test together

F = error

varianceestimate

additionalvariance

accounted forby tested

effects

Page 17: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Areas involved in pressing (left or right)

either more or less active in pressing vs not pressing

(as non-directional)

Page 18: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

A more complex example

2 x 3 model with words presented visually (V) or aurally (A), and belonging to three different categories (C1, C2, C3)

VC1 VC2 VC3 AC1 AC2 AC3

Page 19: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

• To test for the main effect of modality we use the contrast

[ 1 0 0 -1 0 0 0

0 1 0 0 -1 0 0

0 0 1 0 0 -1 0 ]

VC1 VC2 VC3 AC1 AC2 AC3

Page 20: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

• To test for the main effect of category we use the contrast

[ 1 -1 0 1 -1 0 0

0 1 -1 0 1 -1 0 ]

VC1 VC2 VC3 AC1 AC2 AC3

Page 21: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

• To test for the interaction we use the contrast

[ 1 -1 0 -1 1 0 0

0 1 -1 0 -1 1 0 ]

VC1 VC2 VC3 AC1 AC2 AC3

Page 22: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Basis Functions

Page 23: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

What’s a basis ?

Can be used to describe any point in space.

e.g. the common Euclidian basis (x, y, z) forms a basis according to which you can describe a point by its coordinate on each axis.

x

y

4

2

i

j

i

v = 4 i + 2 j

More precisely, the vector going from the origin to that point is equal to a weighted sum of the units vectors of the axes.

Page 24: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

A basis is orthonormal when its elements are perpendicular and linearly independent, and its units vectors have the same norm (length) e.g. Euclidian basis.

In a 2D plane, the basis on the left is orthonormal, the one on the right isn’t.

Page 25: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

In fMRI instead of describing a point you want to describe a curve or function (% signal change in function of time) by decomposing it in simpler functions.

If you use only one function you have a limited power to describe the % signal change variations, so it’s better to use a number of functions, which constitutes a set of basis functions.

That’s why SPM offers different sets of basis functions to model the % signal change variations.

Fourier analysis: the complex wave at the top can be decomposed into the sum of the three simpler waves shown below.

f(t)=h1(t)+h2(t)+h3(t)

f(t)

h1(t)

h2(t)

h3(t)

Basis functions

Page 26: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Linear combination of the basis functions can capture any shape of response up to a specified timescale.

Finite Impulse Response (FIR) Fourier

The most general are the finite impulse response (A) and Fourier (B) basis sets, which make minimal assumptions about the shape of the response.

Basis functions offered by SPM

Page 27: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

One popular choice is the gamma function, which has been shown to provide a reasonably good fit to the impulse response, although it lacks an undershoot.

The set used in SPM is more parsimonious in that fewer functions are required to capture the typical range of impulse responses than are required by the Fourier or FIR sets, reducing the degrees of freedom used in the design matrix and allowing more powerful statistical tests.

Gamma function

More parsimonious basis sets make various assumptions about the shape of the HRF.

Page 28: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Canonical haemodynamic response function (HRF)

Typical BOLD response to an impulse stimulation.

The response peaks approximately 5 sec after stimulation, and is followed by an undershoot that lasts approximately 30 sec (at high magnetic files, an initial undershoot can sometimes be observed).

Page 29: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Neural signal convolved with a canonical HRF to produce the predicted BOLD signal.

In blue sustained neural activity (epoch) modelled by a boxcar.

In green series of rapid events every 2 sec.

The predicted BOLD response in similar.

Page 30: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Fits of a boxcar epoch model with (red) and without (black) convolution by a canonical HRF, together with the data.

Page 31: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Residuals after fits of models with and without HRF convolution. Large systematic errors for model without HRF convolution (black) at onset of each block.

Page 32: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Limits of HRF

- General shape of the BOLD impulse response similar across early sensory regions, such as V1 and S1.

- Variability across higher cortical regions regions, presumably due mainly to variations in the vasculature of different regions.

- Considerable variability across people.

These types of variability can be accommodated by expanding the HRF in terms of temporal basis functions.

Page 33: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Canonical HRF and its derivatives

Canonical HRF

Temporal derivative

Dispersion derivative

The canonical HRF is a “typical” BOLD impulse response characterised by two gamma functions, one modelling the peak and one modelling the undershoot.

To allow variations about the canonical form, the partial derivatives of the canonical HRF with respect to, for example, its peak delay and dispersion parameters can be added as further basis functions.

The temporal derivative can capture differences in the latency of the peak response.

The dispersion derivative can capture differences in the duration of the peak response.

Page 34: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Contrast

Design Matrix for analysing two event-related conditions (left or right motor responses) versus an implicit baseline.

[1 -1 0]

[1 0 0 0 1 0]

SPM-F image corresponding to the overall difference (positive or negative) from the left and right responses.

SPM-t image corresponding to the overall difference between the left and right responses. Left Right Mean

Page 35: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

In the previous design matrix, the onset times where convolved with the canonical haemodynamic response function (HRF) to form the two regressors on the left.

Design matrix with canonical HRF only.

Page 36: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

Design matrix with canonical HRF + 2 derivatives.

This is the same model as before, but 3 regressors are used to model each condition.

The three basis functions are the canonical HRF and its derivatives with respect to time and dispersion.

Left Right Mean

Page 37: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

First, test for all regressors modelling this response using a F contrast.

This contrast tests for each line against the null hypothesis that the parameter is zero.

Because the parameters are tested against zero, one would have to reconstruct the fitted data and check the positive or negative aspects of the response.

[0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0]

For this new model, how do we test the effects of, for instance, the right motor response ?

Page 38: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

This shows the F-contrast used to test the overall difference (across basis functions) between the left and right responses.

Multiplying the coefficients by -1 doesn’t change anything.

[1 0 0 -1 0 0 0 0 1 0 0 -1 0 0 0 0 1 0 0 -1 0]

SPM-F image corresponding to the overall difference between the left and right responses.

Very similar to the one obtained earlier.

How do we test for overall difference bw right and left responses ?

To see if the tested difference is “positive” or “negative” (if this makes sense because the modeled difference could be partly positive and partly negative) one has to look again at the fitted signal.

Page 39: Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)

These plots show the haemodynamic response at a single voxel (the maxima of the previous SPM-F map). The let plot shows the HRF as estimated using the simple model and demonstrates a certain lack of fit. This lack of fit is corrected, on the right, using the more flexible model with basis functions.

Comparison of the fitted response