02 General Linear Model

26
The General Linear Model (GLM) Ged Ridgway Wellcome Trust Centre for Neuroimaging University College London SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM

Transcript of 02 General Linear Model

Page 1: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 1/29

The General Linear Model

(GLM)Ged Ridgway

Wellcome Trust Centre for NeuroimagingUniversity College London

SPM CourseVancouver, August 2010

[slides from the FIL Methods group]

Page 2: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 2/29

Overview of SPM

Page 3: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 3/29

Simple regression and the GLM

Page 4: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 4/29

Passive wordlisteningversus rest

7 cycles of rest and listening

Blocks of 6 scanswith 7 sec TR

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

Stimulus function

One session

A very simple fMRI experiment

Page 5: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 5/29

stimulusfunction

1. Decompose data into effects anderror

2. Form statistic using estimates of effects and error

Make inferences about effects of interesthy?

How?

data linear model

effectsestimate

error estimate

statistic

Modelling the measured data

Page 6: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 6/29

BOLD signal

Tme

single voxeltime series

Voxel-wise time series analysis

modelspecification

parameter estimation

hypothesis

statistic

SPM

Page 7: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 7/29

BOLD signal

Tme

= β1 β2 + e

r r o r

x1 x2 e

Single voxel regression model

Page 8: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 8/29

Page 9: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 9/29

Example GLM factorial design models

• 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…

Page 10: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 10/29

Example GLM factorial design models

Page 11: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 11/29

Example GLM factorial design models

Page 12: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 12/29

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

sphericity = i.i.d.error covariance isscalar multiple of

identity matrix:Cov(e) = σ 2I

Examples for non-sphericity:

non-identit

non-independence

Page 13: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 13/29

Parameter estimation

= +

Ordinary least squares estimation (OLS)

(assuming i.i.d. error):

Objective:estimate parametersto minimize

y X

Page 14: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 14/29

A geometric perspective on the GLM

y

e

Design space

defined by X

x1

x2

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

Ordinary Least Squares (OLS)

Page 15: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 15/29

What are the problems of this model?

1.

BOLD responses have a delayedand 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 theassumptions of the noise model in the GLM

Page 16: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 16/29

The response of a linear time-invariant (LTI) system is the convolution of the inputwith 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

Page 17: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 17/29

ConvolutionSuperposition principle

Page 18: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 18/29

HRF

HRF convolution animations

Sliding the reversed HRF past a unit-

integral pulse and integrating theproduct recovers the HRF (hencethe name impulse response)

The step response shows a delay and

a slight overshoot, before reaching asteady-state. This gives some intuitionfor a square wave…

Page 19: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 19/29

HRF convolution animations

Slow square wave. Main (fundamental)

frequency of output matches input, butwith delay (phase-shift) and change inamplitude (and shape; sinusoids keeptheir shape)

Fast square wave. Amplitude is

reduced, phase shift is more dramatic(output almost in anti-phase).Fourier transform of HRF yieldsmagnitude and phase responses.

Page 20: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 20/29

P bl 2 L f i

Page 21: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 21/29

blue = datablack = mean + low-frequency driftgreen = predicted response, taking into account

low-frequency driftred = predicted response, NOT taking into

account low-frequency drift

Problem 2: Low-frequency noiseSolution: High pass filtering

discrete cosine

transform (DCT) set

Page 22: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 22/29

discrete cosinetransform (DCT) set

High pass filtering

Page 23: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 23/29

with

1 st order autoregressive process: AR(1)

autocovariancefunction

Problem 3: Serial correlations

Page 24: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 24/29

Multiple covariance components

= λ 1 + λ 2

Q 1 Q 2

Estimation of hyperparameters λ with ReML (Restricted Maximum Likelihood).

V

enhanced noise model at voxel i error covariance components Qand hyperparameters λ

Page 25: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 25/29

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

Let

Then

where

WLS equivalent to

OLS on whiteneddata and design

Page 26: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 26/29

Contrasts &statistical parametric maps

Q: activation duringlistening ?

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

Null hypothesis:

Page 27: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 27/29

Summary

• Mass univariate approach.

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

• GLM is a very general approach

• Hemodynamic Response Function

• High pass filtering

• Temporal autocorrelation

Page 28: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 28/29

x1

x2x2*

y

Correlated and orthogonal regressors

When x 2 is orthogonalized withregard to x 1, only the parameter estimate for x 1 changes, not thatfor x 2!

Correlated regressors =explained variance is sharedbetween regressors

t t ti ti b d ML ti t

Page 29: 02 General Linear Model

8/6/2019 02 General Linear Model

http://slidepdf.com/reader/full/02-general-linear-model 29/29

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

ReML-

estimates

t-statistic based on ML estimates

For brevity: