Contrasts and Basis Functions Hugo Spiers Adam Liston
Contrasts and Basis Functions Hugo Spiers Adam Liston
Overview • Contrasts - Hugo – What are they for? – What do I need for a contrast? – What types of model can I use? – What is the best model to use? • Basis Functions – Adam
What is a contrast used for? • The GLM characterises postulated relationships between our experimental manipulations and the data • Contrasts allow us to statistically test a set of possible hypothesis about this modelled data
What do I need for a contrast? • Some data (Y) • A design matrix (X) • Parameters estimated with GLM (ß) • A set of specific hypothesis about the data
Simple Example Human Brain Function 2: Chapter 8 • Investigation of motor cortex • Subject presses a device then rests 4 times • Increasing the amount of force exerted with each press
Constructing the model • How do we model the “press” condition? • Hypothesis: We will see a linear increase in activation in motor cortex as the force increases • Model this with a regressor with a value for each time point a press occurs • These values increase linearly with each press • Since the signal is not on average zero (even without stimuli or task) a constant offset needs to be included
Constructing the model • Do we model the rest periods? • The information contained in the data corresponds effectively to the difference between conditions and the rest period • Therefore in this case NO
Non-parametric Model Time (scans) Regressors 1 2 3 4 5
Non-parametric Model A contrast = A linear combination parameters: C’ x ß Example c’ = 1 1 0 Time (scans) Regressors 1 2 3 4 5
Statistical Tests • T-test – Tells you whethere is a significant increase or decrease in the contrast specified • F-test – Tells you whethere is a significant difference between the conditions in the contrast
Non-parametric Model Example c’ = 1 0 0 Time (scans) Regressors 1 2 3 4 5
Non-parametric Model Example c’ = -1 1 0 0 0 Time (scans) Regressors 1 2 3 4 5
T-tests in Contrasts • A one dimensional contrast of estimated parameters T= c’b T= variance estimate s 2 c’(X’X)+c So, for a contrast in our model of 1 0 0: T = (ß 1 x 1 + ß 2 x 0 + ß 3 x 0 + ß 4 x 0 + ß 5 x 0) Estimated variance
Non-parametric Model Search for a linear increase Example c’ = 1 2 3 4 0 Time (scans) Regressors 1 2 3 4 5
Non-parametric Model Better to 0 centre the contrast Example c’ = -3 -1 1 3 0 Time (scans) Regressors 1 2 3 4 5
F-test • To test a hypothesis about general effects, independent of the direction of the contrast additional variance accounted for by tested F = effects error variance estimate
Non-parametric Model Example Ftest c’ = 1 0 0 1 2 0 0 1 0 0 0 0 Time (scans) Regressors 3 4 5
Parametric Models • If you have too many regressors you reduce your degrees of freedom and your chance of finding false positives rises • Solution: Include regressors that explicitly takes into account prior hypotheses
Linear Parametric Model Time LINEAR PARAMETRIC ALL PRESS MEAN
Linear Parametric Model Regressors 1: NEW REGRESSORS 0 0 2: 3: Main effect of pressing Removed
Non-linear models Regressors 1. Linear 2. Log 3. All press 4. mean
T-test Contrasts with our model Regressors Contrasts 1 0 0 0 - T 1 1. Linear 0 1 0 0 - T 2 0 0 1 0 - T 3 2. Log 0 0 0 1 - T 4 3. Press 4. 4. -1 0 0 0 - T 5 Mean 0 -1 0 0 - T 6 0 0 -1 0 - T 7 0 0 0 -1 - T 8
F- contrast with this model Regressors 1 specified Contrast 1 2 3 4 (regressor) 1. Linear 1. 1 0 0 2. Log 0 0 1 3. Press 4. 4. Mean
Practical Example
Practical Example
Practical Example
Summary • Contrasts are statistical (F or T) tests of specific hypotheses • Non-modelled information is taken into account implicitly in contrasts • F-Contrasts look for the effects of a group of regressors • T-contrasts look for increases or decreases • Non-parametric models can give fine grained information about the variables in the contrast • But, parametric regressors help reduce the number of regressors and test specific hypotheses directly • Parametric increases should be zero centred to specifically test for their effect rather than general increases or decreases relative to the baseline • Using linear and non-linear regressors can help to model parametric data more effectively
Switching gears… basis functions • Once we have the design, how do we relate it to our data?
Switching gears… basis functions • Once we have the design, how do we relate it to our data? • Time series of haemodynamic responses
Switching gears… basis functions • Once we have the design, how do we relate it to our data? • Time series of haemodynamic responses • Fit these using some shape…
A bad model. . .
A « better » model. . .
Basis functions • Can be used in combination to describe any point in space. • For instance, the (x, y, z) axes of a graph are basis functions which combine to describe points on the graph • Orthogonality? ? (x, y, z, ? )
Temporal basis functions
Fourier Series n Any shape can be described by a sum of sines and cosines – violin string
Temporal basis functions
Temporal basis functions Basis functions used in SPM are curves used to ‘describe’ or fit the haemodynamic response.
Temporal basis functions
Summary • The same question can be modelled in multiple ways, but these are not always equally good, and there are many trade-offs. • T tests examine specific one-way questions • F tests can look significance within any of several questions (like an ANOVA) • Basis functions combine to describe the haemodynamic response
spanner? ? ? ! n. For a “set” of basis functions, how do we use the T-test to test for an increase or a decrease?
- Slides: 43