02 general linear model - fil | ucl · spm course vancouver, august 2010 [slides from the fil...

29
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]

Upload: others

Post on 06-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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]

Page 2: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Overview of SPM

Page 3: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Simple regression and the GLM

Page 4: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Passive word listening versus rest

7 cycles of rest and listening

Blocks of 6 scans with 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

Page 5: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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?

data linear model

effects estimate

error estimate

statistic

Modelling the measured data

Page 6: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

BOLD signal Tim

e single voxel time series

Voxel-wise time series analysis

model specification parameter estimation hypothesis statistic

SPM

Page 7: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

BOLD signal

Time

= β1 β2 + + error

x1 x2 e

Single voxel regression model

Page 8: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Mass-univariate analysis: voxel-wise GLM

= + y X Model is specified by 1.  Design matrix X 2.  Assumptions about e

N: number of scans p: number of regressors

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

Page 9: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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 - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Example GLM “factorial design” models

Page 11: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Example GLM “factorial design” models

Page 12: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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

sphericity = i.i.d. error covariance is scalar multiple of

identity matrix: Cov(e) = σ2I

Examples for non-sphericity:

non-identity

non-independence

Page 13: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Parameter estimation

= +

Ordinary least squares estimation (OLS)

(assuming i.i.d. error):

Objective: estimate parameters to minimize

y X

Page 14: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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 - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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

Page 16: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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 response Solution: Convolution model

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

⊗ =

Impulses HRF Expected BOLD

Page 17: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Convolution Superposition principle

Page 18: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

HRF

HRF convolution animations

Sliding the reversed HRF past a unit-integral pulse and integrating the product recovers the HRF (hence the name impulse response)

The step response shows a delay and a slight overshoot, before reaching a steady-state. This gives some intuition for a square wave…

Page 19: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

HRF convolution animations

Slow square wave. Main (fundamental) frequency of output matches input, but with delay (phase-shift) and change in amplitude (and shape; sinusoids keep their shape)

Fast square wave. Amplitude is reduced, phase shift is more dramatic (output almost in anti-phase). Fourier transform of HRF yields magnitude and phase responses.

Page 20: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Convolution model of the BOLD response

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

⊗ HRF

Page 21: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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

Page 22: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

discrete cosine transform (DCT) set

High pass filtering

Page 23: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

with

1st order autoregressive process: AR(1)

autocovariance function

Problem 3: Serial correlations

Page 24: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Multiple covariance components

= λ1 + λ2

Q1 Q2

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

V

enhanced noise model at voxel i error covariance components Q and hyperparameters λ

Page 25: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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

Let

Then

where

WLS equivalent to OLS on whitened data and design

Page 26: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

Contrasts &statistical parametric maps

Q: activation during listening ?

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

Null hypothesis:

Page 27: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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

Page 28: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

x1 x2 x2*

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

Page 29: 02 General Linear Model - FIL | UCL · SPM Course Vancouver, August 2010 [slides from the FIL Methods group] Overview of SPM . Simple regression and the GLM . Passive word listening

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

ReML-estimates

t-statistic based on ML estimates

For brevity: