Download - General Linear Model

Transcript
Page 1: General Linear Model

General Linear Model

Page 2: General Linear Model

General Linear Model

Y1

Y2

.

.

.

YJ

=

X11 … X1l … X1L

X21 … X2l … X2L

.

.

.

XJ1 … XJl … XJL

β1

β2

.

.

.

βL

+

ε1

ε2

.

.

.

εJY = X * β + ε

Observed data Design Matrix Parameters Residuals/Error

timepoints

timepoints

regressors

regressors timepoints

Page 3: General Linear Model

Design Matrix

time

rest

On Off

Off On

Conditions

Use ‘dummy codes’ to label different levels of an experimental factor (eg. On = 1, Off = 0).

task

0000000

1111111

Page 4: General Linear Model

Design Matrix

Covariates

Parametric variationof a single variable (eg. Task difficulty = 1-6)or measured values ofa variable (eg. Movement).

544231631652

Page 5: General Linear Model

Design Matrix

ConstantVariable

Models the baseline activity(eg. Always = 1)

11111111...

Page 6: General Linear Model

Design Matrix

The design matrix should include everythingthat might explain the data.

Regressors

Time

Page 7: General Linear Model

General Linear Model

Y1

Y2

.

.

.

YJ

=

X11 … X1l … X1L

X21 … X2l … X2L

.

.

.

XJ1 … XJl … XJL

β1

β2

.

.

.

βL

+

ε1

ε2

.

.

.

εJY = X * β + ε

Observed data Design Matrix Parameters Residuals/Error

timepoints

timepoints

regressors

regressors timepoints

Page 8: General Linear Model

Error

• Independent and identically distributed

),0(~ 2 Niid

Page 9: General Linear Model

Ordinary Least Squares

0 2 4 6 8 10 12 14 160

5

10

15

20

25

30

35

Residual sum of square:

The sum of the square difference between actual value and fitted value. e

Page 10: General Linear Model

Ordinary Least Squares

0 2 4 6 8 10 12 14 160

5

10

15

20

25

30

35

e

å=

N

tte

1

2 = minimum

Page 11: General Linear Model

Ordinary Least Squares

x1β1

x2β2

ye

Y = Xβ+ee = Y-Xβ

XTe=0=> XT(Y-Xβ)=0=> XTY-XTXβ=0=> XTXβ=XTY=> β=(XTX)-1XTY

Page 12: General Linear Model

fMRI

12

Y = X * β + ε Observed data Design Matrix Parameters Residuals/Error

Page 13: General Linear Model

Problems with the model

Page 14: General Linear Model

The Convolution Model

=

Impulses HRF Expected BOLD

Page 15: General Linear Model

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

HRF

OriginalConvolvedHRF

Page 16: General Linear Model

Physiological Problems

Page 17: General Linear Model
Page 18: General Linear Model
Page 19: General Linear Model

Noise

Low-frequency noise

Solution: High pass filtering

Page 20: General Linear Model

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

discrete cosine transform (DCT) set

discrete cosine transform (DCT) set

Page 21: General Linear Model

Assumptions of GLM using OLS

AllAbout

Error

),0(~ 2INe

Page 22: General Linear Model

Unbiasedness

Expected value of beta =

beta

Page 23: General Linear Model

Normality

Page 24: General Linear Model

Sphericity

Page 25: General Linear Model

Homoscedasticity

Page 26: General Linear Model

not

Page 27: General Linear Model
Page 28: General Linear Model

Independence

Page 29: General Linear Model

Autoregressive Model

y = Xβ + e over timeet = aet-1 + ε

autocovariance function

a should = 0

Page 30: General Linear Model

Thanks to…

• Dr. Guillaume Flandin

Page 31: General Linear Model

References• http://www.fil.ion.ucl.ac.uk/spm/doc/books/hbf2/pdfs/Ch7.pdf• http://www.fil.ion.ucl.ac.uk/spm/course/slides10-vancouver/02_General_

Linear_Model.pdf• Previous MfD presentations