1st Level Analysis: Design matrix, contrasts and inference Rebecca Knight and Lorelei Howard Outline What is first level analysis? The General Linear Model and how this relates to the Design Matrix Regressors within the Design Matrix Overview fMRI time-series Motion correction kernel Design matrix Smoothing General Linear Model Statistical Parametric Map Parameter Estimates Spatial normalisation Standard template Once the image has been reconstructed, realigned, spatially normalised and smoothed…. TheRebecca next step is to statistically analyse the data Knight Key Concepts 1st level analysis – A within subjects analysis where activation is averaged across scans for an individual subject The Between- subject analysis is referred to as a 2nd level analysis and will be described later on in this course Design Matrix – 2D, m = regressors, n = time. A dark-light colour map is used to show the value of each variable at specific time points The Design Matrix forms part of the General linear model, the majority of statistics at the analysis stage use the GLM Rebecca Knight General Linear Model Generic Model Y = X x β + E Dependent Variable Independent Variable Relative Contribution Error (The difference (What you are (What you are (These need to be between the observed measuring) manipulating) estimated) data and that which is predicted by the model) Aim: To explain as much of the variance in Y by using X, and thus reducing E More than 1 IV ? Y = X1β1 + X2β2 + ....X n βn.... + E GLM Continued How does this equation translate to the 1st level analysis ? Each letter is replaced by a set of matrices (2D representations) Y Matrix of BOLD signals (What you collect) Time X = x Design matrix β + Matrix parameters (This is what is put (These need to be into SPM) estimated) E Error matrix (residual error for each voxel) Time Time Regressors Voxels Voxels Regressors Voxels ‘Y’ in the GLM Y = Matrix of Bold signals fMRI brain scans Voxel time course Time Time (scan every 3 seconds) Amplitude/Intensity Rebecca Knight 1 voxel = ~ 3mm³ ‘X’ in the GLM X = Design Matrix Time (n) Regressors (m) Regressors Regressors – represent hypothesised contributors in your experiment. They are represented by columns in the design matrix (1column = 1 regressor) Regressors of Interest or Experimental Regressors – represent those variables which you intentionally manipulated. The type of variable used affects how it will be represented in the design matrix Regressors of no interest or nuisance regressors – represent those variables which you did not manipulate but you suspect may have an effect. By including nuisance regressors in your design matrix you decrease the amount of error. E.g. - The 6 movement regressors (rotations x3 & translations x3 ) or physiological factors e.g. heart rate Regressors A dark-light colour map is used to show the value of each regressor within a specific time point Time (n) Black = 0 and illustrates when the regressor is at its smallest value White = 1 and illustrates when the regressor is at its largest value Grey represents intermediate values The representation of each regressor column depends upon the type of variable specified Rebecca Knight Regressors (m) Conditions As they indicate conditions they are referred to as indicator variables Changes in the bold activation associated with the presentation of a stimulus Type of dummy code is used to identify the levels of each variable E.g. Two levels of one variable is on/off, represented as ON = 1 When you IV is presented OFF = 0 When you IV is absent (implicit baseline) Red box plot of [0 1] doesn’t model the rise and falls Fitted Box-Car Modelling Haemodynamics Changes in the bold activation associated with the presentation of a stimulus Haemodynamic response function Peak of intensity after stimulus onset, followed by a return to baseline then an undershoot Box-car model is combined with the HRF to create a convolved regressor which matches the rise and fall in BOLD signal (greyscale) Even with this, not always a perfect fit so can include temporal derivatives (shift the signal slightly) or dispersion derivatives (change width of the HRF response) *more later in this course HRF Convolved Covariates What if you variable can’t be described using conditions? E.g Movement regressors – not simply just one state or another The value can take any place along the X,Y,Z continuum for both rotations and translations Covariates – Regressors that can take any of a continuous range of values (parametric) Thus the type of variable affects the design matrix – the type of design is also important Designs Block design Intentionally design events of interest into blocks v Event- related design Retrospectively look at when the events of interest occurred. Need to code the onset time for each regressor Separating Regressors The type of design and the type of variables used in your experiment will affect the construction of your design matrix Another important consideration when designing your matrix is to make sure your regressors are separate In other words, you should avoid correlations between regressors (collinear regressors) – because correlations in regressors means that variance explained by one regressor could be confused with another regressor This is illustrated by an example using a 2 x 3 factorial design Example Design Motion High Medium No Motion Low High Medium IV 1 = Movement, 2 levels (Motion and No Motion) IV 2 = Attentional Load, 3 levels (High, Medium or Low) Low Example Cont. V A C1 C2 C3 M N h m l If you made each level of the variables a regressor you could get 5 columns and this would enable you to test main effects BUT what about interactions? How can you test differences between Mh and Nl This design matrix is flawed – regressors are correlated and therefore a presence of overlapping variance (Grey) M N h m l M N h m l Orthogonal design matrix M M M N N N h m l h m l If you make each condition a regressor you create 6 columns and this would enable you to test main effects AND it enable you to test interactions! You can test differences between Mh and Nl This design matrix is orthogonal – regressors are NOT correlated and therefore each regressor explains separate variance Mh Mm Ml Nh Nm Nl M M M N N N h m l h m l h m l M Mh Mm Ml N Nh Nm Nl Summary Y Matrix of BOLD signals X = β x Design matrix Matrix parameters Time Time + E Error matrix Time Regressors Voxels Voxels Regressors Voxels Aim: To explain as much of the variance in Y by using X, and thus reducing E β = relative contribution that each regressor has, the larger the β value = the greater the contribution Next: Examine the effect of regressors Outline Why do we need contrasts? What are contrasts? T contrasts F contrasts Rebecca Knight Why use contrasts GLM: - Specify design matrix - Determine β’s for each voxel for each regressor Use contrasts to: - Specify effects of interest - Perform statistical evaluation of hypotheses Contrasts used and their interpretation depends on the model specification, which in turn depends on the design of the experiment Rebecca Knight What is a contrast? p cT = [1 0 0 0 0 …] Contrast vector of length p cT β = 1xb1 + 0xb2 + 0xb3 + 0xb4 + 0xb5 + . . . Contrast = statistical assessment of cT β Rebecca Knight Different contrasts T contrasts - Unidimensional (vectors) - Directional - Assess effect of one parameter OR compare specific combinations of parameters F contrasts - Multidimensional (matrix) - Non-directional - Collection of T contrasts Rebecca Knight Example Left Right Two event-related conditions The subjects press a button with either their left or right hand, depending on visual instruction T contrasts Left Right Question: Which brain regions respond to Left button presses? cT = [1 0 0 …] cTβ = 1xb1 + 0xb2 + 0xb3 + . . . identifies voxels whose activation increases in response to Left button presses cT = [-1 0 0 …] cTβ = -1xb1 + 0xb2 + 0xb3 + . . . identifies voxels whose activation decreases in response to Left button presses Rebecca Knight T contrasts H0 : cTβ = 0 Experimental Hypotheses: - H1: cTβ > 0 ? - H1: cTβ < 0 ? T-test is a signal-to-noise measure Test Statistic: Contrast of estimated parameters T df = Rebecca Knight Variance estimate cT β = SD (cTβ) T contrasts Subtractive Logic: “ The direct comparison of two regressors that are assumed to differ only in one property, the IV ” Left Right Question: Which brain regions respond more to Left than to Right button presses? cT = [1 -1 0 …] cTβ = 1xb1 + -1xb2 + 0xb3 + . . . cT = [1 -1 0 …] ≠ cT= [-1 1 0 …] must ensure sum of the weights = 0 Rebecca Knight T contrasts Rebecca Knight SPM-t image Clearly see contralateral motor cortex response The map of T-values: spmT_*.img The contrast itself (cTβ; ie, numerator): con_*.img 2nd Level * = number in Contrast Manager F contrasts Matrix of T contrasts Left Right Non-directional Identify voxels showing modulation in response to experimental task, ahead of more specific contrasts Question: Which brain regions respond to Left and/or Right button presses? cT = 1 0 0 … 010… Rebecca Knight F contrasts Determines whether any one regressor OR combination of regressors explains a significant amount of the variance in Y NOT which regressor the effect can be attributed to H0 : β1 = β2 = 0 H1: at least one β ≠ 0 Test Statistic: Explained variability F = Rebecca Knight Error variance estimate F contrasts Rebecca Knight SPM-F image Clearly see motor cortex response The map of F-values: spmF_*.img Also outputs: ess_*.img * = number in Contrast Manager Rebecca Knight Factorial e.g. IV 1 = Movement, 2 levels (Motion and No Motion) IV 2 = Attentional Load, 3 levels (High, Medium or Low) MMMNNN h ml h ml ME Movement • Stack of M > N contrasts for each level of Load • Shows voxels which are more active in M than N (regardless of attentional load) Rebecca Knight Factorial e.g. IV 1 = Movement, 2 levels (Motion and No Motion) IV 2 = Attentional Load, 3 levels (High, Medium or Low) MMMNNN h ml h ml ME Attention • First row = h > m • Second row = m > l • Shows voxels which are more active in h than m AND/OR m than l (regardless of movement level) Rebecca Knight Factorial e.g. IV 1 = Movement, 2 levels (Motion and No Motion) IV 2 = Attentional Load, 3 levels (High, Medium or Low) MMMNNN h ml h ml Interaction • Shows voxels where the attentional load elicits a brain response that is different when there is motion, or not Rebecca Knight Inference We’ve talked about 1st level so far… examining within subject variability. However, we can’t use a sample of one to extrapolate our findings to the general population 2nd level analyses to look for effects at the group level… discussed later in course Rebecca Knight Summary Contrasts are statistical (t or F) tests of specific hypotheses T contrasts: - Compare effect of one regressor with 0 - Compare 2 or more regressors F contrasts: - Multidimensional contrasts Rebecca Knight Resources Huettel. Functional magnetic resonance imaging (Chap 10) MfD Slides 2007 Human Brain Function (Chap 8) Rik Henson and Guillaume Flandin’s slides from SPM courses Rebecca Knight