Outline What is ‘1st level analysis’? The Design matrix

Slides:



Advertisements
Similar presentations
Basis Functions. 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.
Advertisements

General Linear Model L ύ cia Garrido and Marieke Schölvinck ICN.
General Linear Model Beatriz Calvo Davina Bristow.
2nd level analysis – design matrix, contrasts and inference
1st level analysis - Design matrix, contrasts & inference
1 st Level Analysis: design matrix, contrasts, GLM Clare Palmer & Misun Kim Methods for Dummies
SPM 2002 C1C2C3 X =  C1 C2 Xb L C1 L C2  C1 C2 Xb L C1  L C2 Y Xb e Space of X C1 C2 Xb Space X C1 C2 C1  C3 P C1C2  Xb Xb Space of X C1 C2 C1 
Design matrix, contrasts and inference
The General Linear Model Or, What the Hell’s Going on During Estimation?
Classical inference and design efficiency Zurich SPM Course 2014
Statistical Inference
1st level analysis: basis functions and correlated regressors
Lorelei Howard and Nick Wright MfD 2008
Methods for Dummies General Linear Model
1st Level Analysis Design Matrix, Contrasts & Inference
General Linear Model & Classical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM M/EEGCourse London, May.
The General Linear Model
2nd Level Analysis Jennifer Marchant & Tessa Dekker
Methods for Dummies Second level analysis
Contrasts and Basis Functions Hugo Spiers Adam Liston.
With many thanks for slides & images to: FIL Methods group, Virginia Flanagin and Klaas Enno Stephan Dr. Frederike Petzschner Translational Neuromodeling.
Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
Brain Mapping Unit The General Linear Model A Basic Introduction Roger Tait
General Linear Model & Classical Inference London, SPM-M/EEG course May 2014 C. Phillips, Cyclotron Research Centre, ULg, Belgium
Analysis of fMRI data with linear models Typical fMRI processing steps Image reconstruction Slice time correction Motion correction Temporal filtering.
SPM short course – Oct Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
Contrasts & Statistical Inference
Methods for Dummies Second level Analysis (for fMRI) Chris Hardy, Alex Fellows Expert: Guillaume Flandin.
Statistical Analysis An Introduction to MRI Physics and Analysis Michael Jay Schillaci, PhD Monday, April 7 th, 2007.
Statistical Inference Christophe Phillips SPM Course London, May 2012.
FMRI Modelling & Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM Course Chicago, Oct.
Idiot's guide to... General Linear Model & fMRI Elliot Freeman, ICN. fMRI model, Linear Time Series, Design Matrices, Parameter estimation,
The General Linear Model
The General Linear Model Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM fMRI Course London, May 2012.
SPM short – Mai 2008 Linear Models and Contrasts Stefan Kiebel Wellcome Trust Centre for Neuroimaging.
1 st level analysis: Design matrix, contrasts, and inference Stephane De Brito & Fiona McNabe.
The general linear model and Statistical Parametric Mapping I: Introduction to the GLM Alexa Morcom and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B.
Contrasts & Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM Course London, October 2008.
SPM and (e)fMRI Christopher Benjamin. SPM Today: basics from eFMRI perspective. 1.Pre-processing 2.Modeling: Specification & general linear model 3.Inference:
The general linear model and Statistical Parametric Mapping II: GLM for fMRI Alexa Morcom and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B Poline.
The General Linear Model Christophe Phillips SPM Short Course London, May 2013.
The General Linear Model Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM fMRI Course London, October 2012.
SPM short course – Mai 2008 Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
General Linear Model & Classical Inference London, SPM-M/EEG course May 2016 Sven Bestmann, Sobell Department, Institute of Neurology, UCL
General Linear Model & Classical Inference Short course on SPM for MEG/EEG Wellcome Trust Centre for Neuroimaging University College London May 2010 C.
Group Analyses Guillaume Flandin SPM Course London, October 2016
General Linear Model & Classical Inference
The general linear model and Statistical Parametric Mapping
The General Linear Model
2nd Level Analysis Methods for Dummies 2010/11 - 2nd Feb 2011
Statistical Inference
Design Matrix, General Linear Modelling, Contrasts and Inference
A very dumb dummy thinks about modelling, contrasts, and basis functions. ?
Statistical Inference
and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B Poline
The General Linear Model (GLM)
Contrasts & Statistical Inference
The General Linear Model
Rachel Denison & Marsha Quallo
The general linear model and Statistical Parametric Mapping
The General Linear Model
The General Linear Model (GLM)
Contrasts & Statistical Inference
Chapter 3 General Linear Model
MfD 04/12/18 Alice Accorroni – Elena Amoruso
The General Linear Model
Statistical Inference
The General Linear Model
The General Linear Model
Contrasts & Statistical Inference
Presentation transcript:

1st level analysis: Design matrix, contrasts, and inference Roy Harris & Caroline Charpentier

Outline What is ‘1st level analysis’? The Design matrix What are we testing for? What do all the black lines mean? What do we need to include? Contrasts What are they for? t and F contrasts How do we do that in SPM8? Levels of inference A B C D [1 -1 -1 1]

Overview Standard template fMRI time-series Smoothing kernel General Linear Model Design matrix Statistical Parametric Map Motion correction Parameter Estimates Spatial normalisation Standard template Once the image has been reconstructed, realigned, spatially normalised and smoothed…. The next step is to statistically analyse the data Rebecca 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 –The set of regressors that attempts to explain the experimental data using the GLM A dark-light colour map is used to show the value of each variable at specific time points – 2D, m = regressors, n = time. The Design Matrix forms part of the General linear model, the majority of statistics at the analysis stage use the GLM

β Y X + ε x = General Linear Model Generic Model Dependent Variable (What you are measuring) Independent Variable (What you are manipulating) Relative Contribution of X to the overall data (These need to be estimated) Error (The difference between the observed 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 ε Y = X1β1 + X2β2 + ....X n βn.... + ε

GLM continued How does this equation translate to the 1st level analysis ? Each letter is replaced by a set of matrices (2D representations) β Y X + ε x = Matrix of BOLD at various time points in a single voxel (What you collect) Design matrix (This is your model specification in SPM) Parameters matrix (These need to be estimated) Error matrix (residual error for each voxel) Parameter weights (rows) Time (rows) Time (rows) Time (rows) 1 x column (Voxel) Regressors (columns) 1 x Column

‘Y’ in the GLM Y = Matrix of Bold signals Voxel time course Y fMRI brain scans Voxel time course Y Time Time (scan every 3 seconds) 1 voxel = ~ 3mm³ Amplitude/Intensity Rebecca Knight

‘X’ in the GLM X = Design Matrix Time (n) Regressors (m)

Regressors Regressors – represent the hypothesised contribution of your experiment to the fMRI time series. They are represented by the columns in the design matrix (1column = 1 regressor) Regressors of interest i.e. 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, breathing or others (e.g., scanner known linear drift)

Conditions Termed indicator variables as they indicate conditions 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 OFF = 0 Changes in the bold activation associated with the presentation of a stimulus When you IV is presented Red box plot of [0 1] doesn’t model the rise and falls When you IV is absent (implicit baseline) Fitted Box-Car

Ways to improve your model: modelling haemodynamics The brain does not just switch on and off. Convolve regressors to resemble HRF HRF basic function Original HRF Convolved

Designs Block design Event- related design Intentionally design events of interest into blocks Retrospectively look at when the events of interest occurred. Need to code the onset time for each regressor

Regressors A dark-light colour map is used to show the value of each regressor within a specific time point 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 )

Regressors of no interest Variable that 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 E.g. Habituation Including them explains more of the variance and can improve statistics

Summary The Design Matrix forms part of the General Linear Model The experimental design and the variables used will affect the construction of the design matrix The aim of the Design Matrix is to explain as much of the variance in the experimental data as possible

Contrasts and Inference Contrasts: what and why? T-contrasts F-contrasts Example on SPM Levels of inference

Contrasts and Inference Contrasts: what and why? T-contrasts F-contrasts Example on SPM Levels of inference

Contrasts: definition and use After model specification and estimation, we now need to perform statistical tests of our effects of interest. To do that  contrasts, because: Usually the whole β vector per se is not interesting Research hypotheses are most often based on comparisons between conditions, or between a condition and a baseline Contrast vector, named c, allows: Selection of a specific effect of interest Statistical test of this effect

Contrasts: definition and use Form of a contrast vector: cT = [ 1 0 0 0 ... ] Meaning: linear combination of the regression coefficients β cTβ = 1 * β1 + 0 * β2 + 0 * β3 + 0 * β4 ... Contrasts and their interpretation depend on model specification and experimental design  important to think about model and comparisons beforehand

Contrasts and Inference Contrasts: what and why? T-contrasts F-contrasts Example on SPM Levels of inference

T-contrasts One-dimensional and directional Function: eg cT = [ 1 0 0 0 ... ] tests β1 > 0, against the null hypothesis H0: β1=0 Equivalent to a one-tailed / unilateral t-test Function: Assess the effect of one parameter (cT = [1 0 0 0]) OR Compare specific combinations of parameters (cT = [-1 1 0 0])

contrast of estimated parameters T-contrasts Test statistic: Signal-to-noise measure: ratio of estimate to standard deviation of estimate T = contrast of estimated parameters variance estimate

T-contrasts: example Effect of emotional relative to neutral faces Contrasts between conditions generally use weights that sum up to zero This reflects the null hypothesis: no differences between conditions No effect of scaling If you define the contrast [1 1 -1] this is possible and SPM will not return an error but this will test for the hypotheses that the effect of emotional faces is twice as great as the effect of neutral faces, explaining why you need to average across the two emotion conditions. [ ½ ½ -1 ] [ 1 1 -2 ]

Contrasts and Inference Contrasts: what and why? T-contrasts F-contrasts Example on SPM Levels of inference T-contrasts = particular case of F-contrast, when matrix is a vector, and F=T2

F-contrasts Multi-dimensional and non-directional Function: [ 1 0 0 0 ... ] eg c = [ 0 1 0 0 ... ] (matrix of several T-contrasts) [ 0 0 1 0 ... ] Tests whether at least one β is different from 0, against the null hypothesis H0: β1=β2=β3=0 Equivalent to an ANOVA Function: Test multiple linear hypotheses, main effects, and interaction But does NOT tell you which parameter is driving the effect nor the direction of the difference (F-contrast of β1-β2 is the same thing as F-contrast of β2-β1)

F-contrasts Based on the model comparison approach: Full model explains significantly more variance in the data than the reduced model X0 (H0: True model is X0). F-statistic: extra-sum-of-squares principle: X1 X0 X0 F = SSE0 - SSE SSE SSE SSE0 F = Explained variability Error variance estimate or unexplained variability Full model ? or Reduced model?

Contrasts and Inference Contrasts: what and why? T-contrasts F-contrasts Example on SPM Levels of inference

1st level model specification Henson, R.N.A., Shallice, T., Gorno-Tempini, M.-L. and Dolan, R.J. (2002) Face repetition effects in implicit and explicit memory tests as measured by fMRI. Cerebral Cortex, 12, 178-186.

An Example on SPM

Specification of each condition to be modelled: N1, N2, F1, and F2 Name Onsets Duration

Add movement regressors in the model Filter out low-frequency noise Define 2*2 factorial design (for automatic contrasts definition)

The Design Matrix Regressors of interest: β1 = N1 (non-famous faces, 1st presentation) β2 = N2 (non-famous faces, 2nd presentation) β3 = F1 (famous faces, 1st presentation) β4 = F2 (famous faces, 2nd presentation) Regressors of no interest: Movement parameters (3 translations + 3 rotations)

Contrasts on SPM F-Test for main effect of fame: difference between famous and non –famous faces? T-Test specifically for Non-famous > Famous faces (unidirectional)

Contrasts on SPM Possible to define additional contrasts manually:

Contrasts and Inference Contrasts: what and why? T-contrasts F-contrasts Example on SPM Levels of inference

Inferences can be drawn at 3 levels: Voxel-level inference = height, peak-voxel Cluster-level inference = extent of the activation Set-level inference = number of suprathreshold clusters For now we know how SPM computed the uncorrected p-value (directly from the F or T value), but how the correction for multiple comparison is performed will be the object of a later presentation.

Summary We use contrasts to compare conditions Important to think your design ahead because it will influence model specification and contrasts interpretation T-contrasts are particular cases of F-contrasts One-dimensional F-Contrast  F=T2 F-Contrasts are more flexible (larger space of hypotheses), but are also less sensitive than T-Contrasts T-Contrasts F-Contrasts One-dimensional (c = vector) Multi-dimensional (c = matrix) Directional (A > B) Non-directional (A ≠ B)

Thank you! Resources: Slides from Methods for Dummies 2009, 2010, 2011 Human Brain Function; J Ashburner, K Friston, W Penny. Rik Henson Short SPM Course slides SPM 2012 Course slides on Inference SPM Manual and Data Set Special thanks to Guillaume Flandin