An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β...

40
An Overview of Data Processing Tasks in the Analysis of fMRI-based Experiments Functional MRI Workshops Introduction to the GLM in fMRI Data Analysis Robert L. Savoy, Ph.D. The Athinoula A. Martinos Center for Biomedical Imaging HyperVision, Inc. e-mail: [email protected]

Transcript of An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β...

Page 1: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

An Overview of Data Processing Tasks

in the Analysis of fMRI-based Experiments

Functional MRI WorkshopsIntroduction to the GLM in fMRI Data Analysis

Robert L. Savoy, Ph.D.The Athinoula A. Martinos Center for Biomedical Imaging

HyperVision, Inc.e-mail: [email protected]

Page 2: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

OutlineConnecting two “famous” cartoons... &

Data Processing lectures at the fMRI VFP (MGH)! Optimizing Data Acquisition! Preprocessing! Modeling for First Level Estimation! Modeling for Second Level Estimation! Inference and Critical Thresholds! (Sixth Lecture: Connectivity and Multivariate Analysis)

Now to draw connections between above two cartoons...apologizing that they may make more sense after the course...

Page 3: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

NMR

MRI ExperimentalTask

ComparingBrains

Psycho-physiological

Laboratory

Data Analysis

Practicalities

FunctionalNeuroanatomy

Hemodynamics

ComputationalNeuroanatomy

ExperimentalDesign

DataAnalysis

Page 4: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Overview of SPM

“SpatialNormalisation”

Statistical parametric map (SPM)

Imagetime-series

Parameterestimates

GLM: GeneralLinear Model

Realignment Smoothing

Designmatrix

StandardizedAnatomicalTemplate

SpatialSmoothing

Kernel

Gaussian field theory

p <0.05

Statisticalinference

Page 5: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Overview of SPM

“SpatialNormalisation”

Statistical parametric map (SPM)

Imagetime-series

Parameterestimates

GLM: GeneralLinear Model

Realignment Smoothing

Designmatrix

StandardizedAnatomicalTemplate

SpatialSmoothing

Kernel

Gaussian field theory

p <0.05

Statisticalinference

Preprocessing Modeling Inference

Page 6: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 1

Optimizing Data Acquisition

This is the attempt to get the best quality images that you can from your scanner, subject, and experiment.

Page 7: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 2

Preprocessing: Realignment

Primarily, this is to compensate, on a global level, for the fact that living subjects move. It is “realigning” images with

similarly collected images---images like themselves.

Page 8: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 2

Preprocessing: Spatial Smoothing

This is almost always done, because the size of the activated region is typically larger than a single voxel. It benefits the

statistical analysis in a number of ways...in most experiments.

Page 9: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 2

Preprocessing: Spatial Normalization

Putting brain data in a “standard” 3-dimensional coordinate space permits group analysis and reporting findings.

Realignment can be associated with “spatial normalization when going between imaging modalities (PET & fMRI; T1 & T2*)

Page 10: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 3

Modeling for First Level Estimation

This is the search for “task-related activity” in each individual subject.

Page 11: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Overview of SPM

“SpatialNormalisation”

Statistical parametric map (SPM)

Imagetime-series

Parameterestimates

GLM: GeneralLinear Model

Realignment Smoothing

Designmatrix

StandardizedAnatomicalTemplate

SpatialSmoothing

Kernel

Gaussian field theory

p <0.05

Statisticalinference

Preprocessing Modeling Inference

Page 12: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

effects of interest error varianceeffects of no interest

effects of interesterror variancestatistic = -----------------------------

The Jewelwe seek!

ExplainedVariance

The UnexplainedVariance,

called “noise”

Page 13: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 4

Modeling for Second Level Estimation

ExperimentalDesign

“Second Level” modeling can refer to many things.Most commonly, it refers to group analyses of various kinds.

Page 14: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lecture 5

Inference and Critical Thresholds

Inference and “critical thresholds” are a core part of the history of the SPM software package. “Gaussian Random Field” theory was an attempt to deal with the problem of multiple comparisons

without invoking the overly stringent Bonferonni correction.

No Statistics Here!

Page 15: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMR Model Specification and Estimation

!! CEO & Chief Software Developer ! Brain Innovation B.V. ! Maastricht, The Netherlands

! Maastricht Brain Imaging Center! ! ! F.C. Donders Center for! Department of Cognitive Neuroscience! ! Cognitive Neuroimaging! Maastricht University! ! ! ! ! Nijmegen, The Netherlands! Maastricht, The Netherlands! ! ! !

! Rainer Goebel

Basic fMRI Course Human Brain Mapping Conference Florence, Italy, 11th June 2006

Page 16: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

View 1:A series of volumes(scans, 3D “images”) Useful for seeking spatio-temporal patterns, e.g., via PCA, ICA, etc.

View 2:Multiple voxel time series Useful for seeking temporal patterns in each individual voxel of the volumes. Standard hypothesis-driven statistical analysis (e.g., GLM) goes with view 2 since it is applied independently for each voxel time course, i.e., “voxel-wise” statistical analysis.

Two Views on fMRI Data

Page 17: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Inference: Use Uncertainty of Parameter Estimates

Rest Stim

a)

Rest Stim

b)

Mean 2

Mean 1

• Same mean values in Rest and Stim condition in cases a) and b) Simple subtraction (difference = Mean 2 – Mean 1) yields same result ! Simple subtraction does NOT consider variance of means (noise)

noise

• Statistical analysis (e.g., t test) relates estimate (mean difference) to uncertainty of estimate = pooled variance of values within conditions, i.e.

noise

noise

noise

Page 18: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Neural pathway Hemodynamics MR scanner

Convolution kernel

From Experimental Timing to Expected fMRI Time Course

Page 19: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMRI signal

+

β0 ×

β1 ×= +

β2 ×

residuals

design matrix

+

The General Linear Model (GLM)

The design matrix models expected signal time courses for individual conditions (effects of interest), but may also include additional predictor time courses (confounds, effects of no interest) helping to improve explaining the data. In this example, two main predictors are defined (X1 and X2). A “constant” predictor (X0) is required to fit the base level of the signal time course. The expected time courses are obtained by convolving the condition “box-car” functions (red / green) with the assumed impulse response (HRF, two-gamma function).

X0

X1

X2Time Time

Time

Page 20: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMRI signal

+

β0 ×

β1 ×= +

β2 ×

residuals

design matrix

+

The General Linear Model (GLM)

...The expected time courses are obtained by convolving the condition “box-car” functions (red / green) with the assumed impulse response (HRF, two-gamma function).

X0

X1

X2Time Time

Time

Page 21: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMRI signal

+β0 × β1 ×= +β2 ×

residualsdesign matrix

+

Time

The General Linear Model (GLM)

The time courses of the signal, predictors and residuals can be rearranged in column form with time running from top to bottom. This view is helpful to understand the matrix form of the General Linear Model.

Time

Page 22: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMRI signal= data

+

β0 × β1 ×

= +

β2 ×

residuals= error

design matrix= model

(defined by YOU)

+

estimate!

Time

The General Linear Model (GLM)

Page 23: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMRI signal= data

+

β0 × β1 ×

= +

β2 ×

residuals= error

design matrix= model

(defined by YOU)

+

estimate!

Time

The GLM time courses, especially the design matrix is often shown in a graphical view using a black-to-white colour range for coding (expected) signal intensities.

The General Linear Model (GLM)

Page 24: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

fMRI signal= data

+=

+

residuals= error

design matrix= model

(defined by YOU)

+

Time

+= ++Time

fMRI signal= data

residuals= error

design matrix= model

(defined by YOU)

Page 25: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

The General Linear Model (GLM)

SPM Course Zurich2009

Klaas Enno Stephan Laboratory for Social & Neural Systems ResearchInstitute for Empirical Research in EconomicsUniversity of Zurich

Functional Imaging Laboratory (FIL)Wellcome Trust Centre for NeuroimagingUniversity College London

With many thanks for slides & images to:FIL Methods group

Page 26: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

The response of a linear time-invariant (LTI) system is the convolution of the input with the system's response to an impulse (delta function).

Problem 1: Shape of BOLD responseSolution: Convolution model

hemodynamic response function (HRF)

expected BOLD response = input function ⊗ impulse response function (HRF)

Page 27: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Convolution model of the BOLD responseConvolve stimulus function with a canonical hemodynamic response function (HRF):

⊗ HRF

Stimulus timing shown in REDStimulus timing convolved with the “canonical” HRF Shown in GREENMR data shown in BLUE

Page 28: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Stimulus timing convolved with the

“canonical” HRF...

What is the use, in most analyses, of “canonical HRF” function?

It refers to the fact that the SAME “HRF” is used FOR ALL voxels in the brain, FOR ALL stimulus types, FOR ALL subjects!

Page 29: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Stimulus timing convolved with the

“canonical” HRF...

One can use the “Finite Impulse Response (FIR)” model to estimate the HRF individually: for each voxel in the brain, for each stimulus type, for each subject.In practice, full FIR analysis is rarely done. But estimating the dispersion and delay of the HRF individually on a voxel basis, and then treating those as “covariates of no interest”, is more commonly useful.

Page 30: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

The General Linear Model (GLM)

Page 31: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

The GLM in Matrix Notation

observed variable,fMRI time course

designmatrix

predictor,explanatory variable,regressor, covariate,

basis function

beta weights,coefficients

errors,residuals

another predictor...one of “k” functions to help fit the data in the

GLM

Page 32: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

The GLM in Matrix Notation

Page 33: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Observed fMRI signal:

Predicted fMRI signal:

Prediction error:

The GLM in Matrix Notation

Page 34: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Fitting a GLM

Page 35: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

GLM – Example, block design

b0 = 101.9

residuals

design matrix

Observed fMRI signal

Predicted fMRI signal

Page 36: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

+

b0 = 101.6

residuals

design matrix

b1 = 1.8

GLM - Example

Observed fMRI signal

Predicted fMRI signal

Page 37: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

+

b0 = 101.0

residuals

design matrix

b1 = 4.5

GLM - Example

Observed fMRI signal

Predicted fMRI signal

Page 38: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

+

b0 = 100.2

residuals

design matrix

+

b1 = 3.4

b2 = 5.5

GLM - Example

Observed fMRI signal

Predicted fMRI signal

Page 39: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

Lessons from the GLM Example

• To obtain optimal GLM fits, all known effects should be modelled in the design matrix.

• Non-modelled effects are moved to the residuals, substantially increasing the error variance. This leads to poor fits and reduced statistical power (the error variance is one component of the standard error of contrasts).

• Inspection of the residuals is a good diagnostic to assess the goodness-of-fit of a GLM: If one observes prominent, low-frequency fluctuations, it is likely that not all effects have been modelled or that the modelled time courses do not fit to the data. The latter might be for example, due to delayed fMRI responses with respect to predictors.

• Confound predictors may be added to improve the fit, for example, predictors capturing low-frequency drifts (Fourier basis functions or Discrete Cosine Transform, DCT, basis functions), if drifts are not removed already during data preprocessing.

Page 40: An Overview of Data Processing Tasks in the Analysis of ... · fMRI signal + β 0 × = β 1 × + β 2 × residuals design matrix + The General Linear Model (GLM) The design matrix

An Overview of Data Processing Tasks

in the Analysis of fMRI-based Experiments

Functional MRI WorkshopsIntroduction to the GLM in fMRI Data Analysis

Robert L. Savoy, Ph.D.The Athinoula A. Martinos Center for Biomedical Imaging

HyperVision, Inc.e-mail: [email protected]