first level analysis

25
First level analysis methods for dummies 2009, Tessa Dekker Model fitting at the within subject level

Upload: leah-mcclain

Post on 30-Dec-2015

31 views

Category:

Documents


1 download

DESCRIPTION

First level analysis. methods for dummies 2009, Tessa Dekker. Model fitting at the within subject level. You have collected time series of bold-signal during your task in voxels in the brain:. Time. Time. Time. Time. Run 1. Run 1. Run 2. Run 2. First level. Subject 1. Subject n. - PowerPoint PPT Presentation

TRANSCRIPT

First level analysis

methods for dummies 2009, Tessa Dekker

Model fitting at the within subject level

You have collected time series of bold-signal during your task in voxels in the brain:

Time

Run 1

Time

Run 2

Subject 1

Time

Run 1

Time

Run 2

Subject nFirst level

Second level group(s)

You have preprocessed your data (realigning, filtering, spatial normalization etc.) and are ready to go look for brain regions in which your experimental manipulation had an effect.

Now what?

First level analysis: Find out for each voxel in a

subject to what extent it shows a response pattern you would

expect based on your experimental manipulation or

other things that you know may have impacted the signal.

First level, within subject analysis.From the observed response in a voxel

to single subject SPM

BOLD signal

Time

single voxeltime series (Y in GLM)

single voxeltime series (Y in GLM)

Modelspecification

nn

Modelspecification

nnParameterestimation

Parameterestimation

HypothesisHypothesis

StatisticStatistic

SPMSPM

Time

Second levelanalysis

Outline:

• Modeling the BOLD-response; the design matrix

• The GLM and parameter estimation• T and F contrasts and parametric designs • Statistical inference• An SPM example• Some remarks on orthogonal contrasts

Predicting the Bold-responseI presented a flashing visual stimulus

I predict that a voxel that responds looks like this:

And a voxel that doesn’t care looks like this:

7

This prediction is formulated in the design matrix X

•The design matrix is simply a mathematical description of your experiment

•E.g.: ‘visual stimulus on = 1’ (white) ‘visual stimulus off = 0’ (black)•Or ‘no =0, medium=1, much pain=2’

•Each column of the design matrix corresponds to an effect one has built into the experiment or that may confound the results (RT, motion parameters etc)

•To minimise the error term of the model, you want to model as much of Y as possible using variables specified in X

Original design variables Mean Other sources of variation, convolved HRF (next week)

Time

001100110011001100.....

8

Y = X x β + εObserved data:Y: time-series of BOLD signal in a single voxel

Design matrix:Variables that explain the observed data, i.e. the BOLD time series for the voxel (EV)

Parameters:The contribution of each component of the design matrix to the signal Y (aim to minimise error)

Error:Difference between the observed data, Y, and the time-course predicted by the model, Xβ.

= +

N N P

P

N

N= nr of scansP= nr of regressors

The GLM for fMRI:

Finding the best fitting model:

SPM finds a for each EV so that our total model as defined in the design matrix optimally fits the observed data in the voxel.

Finding the best fitting model:

These optimal fitting values are saved in beta image files for each EV. The residual signal variance in the voxel, unexplained by the model (within subject error) is saved in MSres image files.

Methods:

• Variational Bayes: allows for spatial priors for regression and regularized voxel-wise models for noise processing, see SPM manual or book

• Least squares method (classic): finds which linear combination of X variables in design matrix results in minimal difference between observed data and predicted data by

TXy 2 TXy 2yXXX TT 1)(ˆ yXXX TT 1)(ˆ

Gives:Minimizing:

Contrasts• But usually we are not interested in the whole model

– What variation in the signal is the result of a visual stimulus and not of movement?

• A contrast selects a specific effect of interest:– a contrast c is a vector of the length of the number of EVs in the design matrix.– cTβ is a linear combination of regression coefficients β.

cTβ = 1x1 + 0x2 + 0x3 + 0x4 + 0x5 + . . . cT = [1 0 0 0 0 …]

cTβ = 0x1 + -1x2 + 1x3 + 0x4 + 0x5 + . . .

cT = [0 -1 1 0 0 …]

• SPM saves these linear combinations of coefficients as contrast images and feeds them up to higher level analysis

13

Define contrasts - Factorial design

LOW

LOAD

HIGH

A B

C D

MOTION NO MOTION

• SIMPLE MAIN EFFECT– A – B– Simple main effect of motion (vs. no motion)

in the context of low load– [ 1 -1 0 0]

• MAIN EFFECT– (A + B) – (C + D) – The main effect of low load (vs. high load)

irrelevant of motion– Main effect of load– [ 1 1 -1 -1]

• INTERACTION– (A - B) – (C - D) – The interaction effect of motion (vs. no

motion) greater under low (vs. high) load– [ 1 -1 -1 1]

A B C D

A B C D

A B C D

a vector of the length of your (here 4) EVs

14

From design 2 design matrix 2 contrast

• Imaging a 2x3 factorial design with factors Modality (Auditory, Visual) and Condition (Concrete, Abstract, Proper)

Visual

Auditory

C1: Concrete nouns

C2: Abstract nouns

C3: Proper nouns

C2: Abstract nouns

C3: Proper nouns

C1: Concrete nouns

V A C1 C2 C3You can model it like this…but is it the best way?

15

What can we test with this design matrix?

V A C1 C2 C3

We can test for main effects:

- Visual > Auditory? C: [1 -1 0 0 0]

- Concrete > Abstract? C: [0 0 1 -1 0]

But we can’t test for interactions or simple main effects:

Visual/concrete > Auditory/concrete???

16

An orthogonal design matrix

V A V A V AC1 C1 C2 C2 C3 C3

Just like in SPSS, you need to cross your variables in order to model interactions

SPM will do this for you automatically if you have a factorial design – just input the factors and the number of levels

V

A

C2 C3

Statistical inference•For each voxel, we estimated the value of the regression coefficient for each variable (column) in our model (design matrix)

•We defined contrasts to pick out variables or combinations of variables of interest in our model

•a large value of cX reflects a large effect size (% signal change) of our contrast of interest

•But data is noisy- so can we trust these effects are not due to chance??•To find this out SPM can calculate t and f-test statistical maps for each contrast using beta images, contrasts, residual variance maps and means.

cT = 1 0 0 0 0 0 0 0

T =

contrast ofestimated

parameters

varianceestimate

box-car amplitude > 0 ?=

1 = cT> 0 ?

1 2 3 4 5 ...

T-statistic - one dimensional contrasts – SPM{t}

Question:

Null hypothesis: H0: cT=0 H0: cT=0

Test statistic:

pNTT

T

T

T

tcXXc

c

c

cT

ˆ

)ˆvar(

ˆ

12

pNTT

T

T

T

tcXXc

c

c

cT

ˆ

)ˆvar(

ˆ

12

T-contrast in SPM

ResMS image

yXXX TT 1)(ˆ

con_???? image

Tc

pN

T

ˆˆ

ˆ 2

beta_???? images

spmT_???? image

SPM{t}

For a given contrast c:

F-statistic

• F-tests can be viewed as testing for the additional variance explained by a larger model compared to a simpler model

0000

0100

0010

0001

• Tests a weighted sum of squaressum of squares of one or several linear combinations of the regression coefficients: is bidirectional (squared t-test)

• Contrasts and hypotheses:

0 : Hypothesis Null 3210 H

0 oneleast at : Hypothesis eAlternativ kAH

RSS

RSSRSSF

0

RSS

RSSRSSF

0

F-contrast in SPM

ResMS image

yXXX TT 1)(ˆ pN

T

ˆˆ

ˆ 2

beta_???? images

spmF_???? images

SPM{F}

ess_???? images

( RSS0 - RSS )

Hypothesis Testing

P-value: A p-value summarises evidence against H0.

This is the change of observing value more extreme than t under the null hypothesis.

Observation of test statistic t, a realisation of T Null Distribution of T

)|( 0HtTp )|( 0HtTp

Type I Error α: Acceptable false positive rate α. Level threshold uα

Threshold uα controls the false positive rate

t

P-val

Null Distribution of T

u

The conclusion about the hypothesis: We reject the null hypothesis in favour of the

alternative hypothesis if t > uα

)|( 0HuTp

T-test: a simple example

Q: activation during viewing ?

Q: activation during viewing ?

cT = [ 1 0 ]

Null hypothesis:Null hypothesis: 01

)ˆ(

ˆ

T

T

cStd

ct

)ˆ(

ˆ

T

T

cStd

ct

Passive viewing versus rest

SPMresults:Height threshold T = 3.2057 {p<0.001}

Statistics: p-values adjusted for search volume

set-levelc p

cluster-levelp corrected p uncorrectedk E

voxel-levelp FWE-corr p FDR-corr p uncorrectedT (Z

)

mm mm mm

0.000 10 0.000 520 0.000 0.000 0.000 13.94 Inf 0.000 -63 -27 150.000 0.000 12.04 Inf 0.000 -48 -33 120.000 0.000 11.82 Inf 0.000 -66 -21 6

0.000 426 0.000 0.000 0.000 13.72 Inf 0.000 57 -21 120.000 0.000 12.29 Inf 0.000 63 -12 -30.000 0.000 9.89 7.83 0.000 57 -39 6

0.000 35 0.000 0.000 0.000 7.39 6.36 0.000 36 -30 -150.000 9 0.000 0.000 0.000 6.84 5.99 0.000 51 0 480.002 3 0.024 0.001 0.000 6.36 5.65 0.000 -63 -54 -30.000 8 0.001 0.001 0.000 6.19 5.53 0.000 -30 -33 -180.000 9 0.000 0.003 0.000 5.96 5.36 0.000 36 -27 90.005 2 0.058 0.004 0.000 5.84 5.27 0.000 -45 42 90.015 1 0.166 0.022 0.000 5.44 4.97 0.000 48 27 240.015 1 0.166 0.036 0.000 5.32 4.87 0.000 36 -27 42

Design matrix

0.5 1 1.5 2 2.5

10

20

30

40

50

60

70

80

1

Xvoxel-level

p uncorrectedT ( Z)mm mm mm

13.94 Inf 0.000 -63 -27 15 12.04 Inf 0.000 -48 -33 12 11.82 Inf 0.000 -66 -21 6 13.72 Inf 0.000 57 -21 12 12.29 Inf 0.000 63 -12 -3 9.89 7.83 0.000 57 -39 6 7.39 6.36 0.000 36 -30 -15 6.84 5.99 0.000 51 0 48 6.36 5.65 0.000 -63 -54 -3 6.19 5.53 0.000 -30 -33 -18 5.96 5.36 0.000 36 -27 9 5.84 5.27 0.000 -45 42 9 5.44 4.97 0.000 48 27 24 5.32 4.87 0.000 36 -27 42

Final remarks:

• Some designs are less efficient than others• If EVs are correlated it is hard to disentangle which one

drives the effect in the voxel, resulting in less power to detect a unique effect of that EV (e.g.: button press and target detection)

• SPM gives you an estimation of this problem in the orthogonality matrix – depicts the magnitude of the cosine of the angle between the EVs as indicator of

correlation (Dark is close to 1, highly correlated. White means Evs are orthogonal or uncorrelated, good).

References

• MFD slides 2007• Short SPM course slides (by Guillaume)• FSL course slides• SPM manual• SPM book, chapter 1, 7 and 8