The General Linear Model (GLM)

Post on 13-Jan-2016

53 views 15 download

Tags:

description

The General Linear Model (GLM). Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London. [slides from the Methods group]. SPM Course London, October 2009. Overview of SPM. Statistical parametric map (SPM). Design matrix. Image time-series. Kernel. Realignment. - PowerPoint PPT Presentation

Transcript of The General Linear Model (GLM)

The General Linear Model(GLM)

Guillaume Flandin

Wellcome Trust Centre for Neuroimaging

University College London

SPM Course

London, October 2009

[slides from the Methods group]

Overview of SPM

RealignmentRealignment SmoothingSmoothing

NormalisationNormalisation

General linear modelGeneral linear model

Statistical parametric map (SPM)Statistical parametric map (SPM)Image time-seriesImage time-series

Parameter estimatesParameter estimates

Design matrixDesign matrix

TemplateTemplate

KernelKernel

Random Random field theoryfield theory

p <0.05p <0.05

StatisticalStatisticalinferenceinference

Passive word listeningversus rest7 cycles of rest and listeningBlocks of 6 scanswith 7 sec TR

Question: Is there a change in the BOLD response between listening and rest?

Stimulus function

One session

A very simple fMRI experiment

stimulus function

1. Decompose data into effects and error

2. Form statistic using estimates of effects and error

Make inferences about effects of interest

Why?

How?

datalinearmodel

effects estimate

error estimate

statistic

Modelling the measured data

Time

BOLD signalTim

esingle voxel

time series

single voxel

time series

Voxel-wise time series analysis

modelspecificati

on

modelspecificati

onparameterestimationparameterestimation

hypothesishypothesis

statisticstatistic

SPMSPM

BOLD signal

Tim

e =1 2+ +

err

or

x1 x2 e

Single voxel regression model

exxy 2211 exxy 2211

Mass-univariate analysis: voxel-wise GLM

=

e+yy XX

N

1

N N

1 1p

p

Model is specified by1. Design matrix X2. Assumptions about

e

Model is specified by1. Design matrix X2. Assumptions about

e

N: number of scansp: number of regressors

N: number of scansp: number of regressors

eXy eXy

The design matrix embodies all available knowledge about experimentally controlled factors and potential confounds.

),0(~ 2INe ),0(~ 2INe

• one sample t-test• two sample t-test• paired t-test• Analysis of Variance (ANOVA)• Factorial designs• correlation• linear regression• multiple regression• F-tests• fMRI time series models• etc…

GLM: mass-univariate parametric analysis

Parameter estimation

eXy

= +

e

2

1

Ordinary least squares estimation

(OLS) (assuming i.i.d. error):

Ordinary least squares estimation

(OLS) (assuming i.i.d. error):

yXXX TT 1)(ˆ

Objective:estimate parameters to minimize

N

tte

1

2

y X

A geometric perspective on the GLM

y

e

Design space defined by X

x1

x2 ˆ Xy

Smallest errors (shortest error vector)when e is orthogonal to X

Ordinary Least Squares (OLS)

0eX T

XXyX TT

0)ˆ( XyX T

yXXX TT 1)(ˆ

What are the problems of this model?

1. BOLD responses have a delayed and dispersed form. HRF

2. The BOLD signal includes substantial amounts of low-frequency noise (eg due to scanner drift).

3. Due to breathing, heartbeat & unmodeled neuronal activity, the errors are serially correlated. This violates the assumptions of the noise model in the GLM

t

dtgftgf0

)()()(

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

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

=

Impulses HRF Expected BOLD

Convolution model of the BOLD response

Convolve stimulus function with a canonical hemodynamic response function (HRF):

HRF

t

dtgftgf0

)()()(

blue = data

black = mean + low-frequency drift

green = predicted response, taking into account low-frequency drift

red = predicted response, NOT taking into account low-frequency drift

Problem 2: Low-frequency noise Solution: High pass filtering

discrete cosine transform (DCT)

set

discrete cosine transform (DCT)

set

discrete cosine transform (DCT)

set

High pass filtering

withwithttt aee 1 ),0(~ 2 Nt

1st order autoregressive process: AR(1)

)(eCovautocovariance

function

N

N

Problem 3: Serial correlations

Multiple covariance components

~ (0, )i ie N C~ (0, )i ie N C2

i i

j j

C V

V Q

2

i i

j j

C V

V Q

= 1 + 2

Q1 Q2

Estimation of hyperparameters with ReML (Restricted Maximum Likelihood).

V

enhanced noise model at voxel i error covariance components Qand hyperparameters

1 1 1ˆ ( )T TX V X X V y

Parameters can then be estimated using Weighted Least Squares (WLS)

Let 1TW W V

1

1

ˆ ( )

ˆ ( )

T T T T

T Ts s s s

X W WX X W Wy

X X X y

Then

where

,s sX WX y Wy

WLS equivalent toOLS on whiteneddata and design

Contrasts &statistical parametric

maps

Q: activation during listening ?

Q: activation during listening ?

c = 1 0 0 0 0 0 0 0 0 0 0

Null hypothesis:Null hypothesis: 01

)ˆ(

ˆ

T

T

cStd

ct

)ˆ(

ˆ

T

T

cStd

ct

X

Summary

• Mass univariate approach.

• Fit GLMs with design matrix, X, to data at different points in space to estimate local effect sizes,

• GLM is a very general approach

• Hemodynamic Response Function

• High pass filtering

• Temporal autocorrelation

ConvolutionSuperposition principle

x1

x2x2*

y

Correlated and orthogonal regressors

When x2 is orthogonalized with regard to x1, only the parameter estimate for x1 changes, not that for x2!

Correlated regressors = explained variance is shared between regressors

121

2211

exxy

121

2211

exxy

1;1 *21

*2

*211

exxy

1;1 *21

*2

*211

exxy

GLM assumes Gaussian “spherical” (i.i.d.) errors

sphericity = i.i.d.error covariance is scalar multiple of identity matrix:Cov(e) = 2I

sphericity = i.i.d.error covariance is scalar multiple of identity matrix:Cov(e) = 2I

10

01)(eCov

10

04)(eCov

21

12)(eCov

Examples for non-sphericity:

non-identity

non-independence

WeWXWy

c = 1 0 0 0 0 0 0 0 0 0 0c = 1 0 0 0 0 0 0 0 0 0 0

)ˆ(ˆ

ˆ

T

T

cdts

ct

cWXWXc

cdtsTT

T

)()(ˆ

)ˆ(ˆ

2

)(

ˆˆ

2

2

Rtr

WXWy

ReML-estimates

ReML-estimates

WyWX )(

)(2

2/1

eCovV

VW

)(WXWXIRX

t-statistic based on ML estimates

iiQ

V

TT XWXXWX 1)()( TT XWXXWX 1)()( For brevity: