Presentation is loading. Please wait.

Presentation is loading. Please wait.

SPM short – Mai 2008 Linear Models and Contrasts Stefan Kiebel Wellcome Trust Centre for Neuroimaging.

Similar presentations


Presentation on theme: "SPM short – Mai 2008 Linear Models and Contrasts Stefan Kiebel Wellcome Trust Centre for Neuroimaging."— Presentation transcript:

1 SPM short course @ICN – Mai 2008 Linear Models and Contrasts Stefan Kiebel Wellcome Trust Centre for Neuroimaging

2 realignment & coregistration smoothing normalisation Corrected p-values images Adjusted data Design matrix Anatomical Reference Spatial filter Random Field Theory Your question: a contrast Statistical Map Uncorrected p-values General Linear Model

3 w t- and F-tests w Improving your model Overview w An example w General linear model revisited w Correlations

4 w t- and F-tests w Improving your model Overview w An example w General linear model revisited w Correlations

5 Temporal series fMRI Statistical image (SPM) voxel time course One voxel = One test (t, F,...) amplitude time General Linear Model Üfitting Üstatistical image

6 Regression example = ++ voxel time series 90 100 110       box-car reference function -10 0 10   90 100 110 Mean value Fit the GLM -2 0 2

7 RegressorsRegressors =  + + ss =++ Y error   11 22  f(t)

8 Matrix/vector form   =+  =  +YX data vector (voxel time-series) design matrix parameters error vector    

9 Add more regressors (high-pass filter) Discrete cosine transform basis functions

10 Design matrix =  +  =  + Y X data vector design matrix Parameters (the ‘betas’) error vector   

11 Fitting the model raw fMRI time series adjusted for low frequency effects residuals fitted “high-pass filter” fitted box-car the squared values of the residuals 

12 w Regressorsin the model describe our knowledge about the signal variation over time. These regressors can be ‘of interest’ or of ‘no interest’. w Regressors in the model describe our knowledge about the signal variation over time. These regressors can be ‘of interest’ or of ‘no interest’. Summary (1) w Coefficients (= parameters) are estimated using the Ordinary Least Squares (OLS) or Maximum Likelihood (ML) estimator. w The estimated parameters depend on the scaling of the regressors. SPM takes care of their normalisation and ensures comparability. w The resulting tests (t,F), do not depend on the scaling of the regressors.

13 w t- and F-tests w Improving your model Overview w An example w General linear model revisited w Correlations

14 least squares estimates c T = +1 0 0 0 0 0 0 0 0 0 0 t-test - one dimensional contrasts - SPM{t} Test: Boxcar amplitude > 0?

15 Tests multiple linear hypotheses : Does X 1 model anything ? F-test (SPM{F}) Full model X H 0 : True (reduced) model is X 0 X1X1 X0X0 Reduced model X0X0 F = error variance estimate additional variance accounted for by tested effects with

16 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 SPM{F} Question : does DCT set model anything? F-test (SPM{F}) : multi-dimensional contrasts test H 0 : H 0 :  3:9 = (0 0 0 0...) X1X1 X0X0 Full modelReduced model H 0 : True model is X 0 X0X0

17 In theory, an F-test (and t-test) proceeds as follows: 1.Fit reduced model to data and compute 2.Fit X 1 model to residuals and compute 3.Compute t- or F-statistic F- and t-tests are ‘sequential tests’ Full X1X1 X0X0 Reduced X0X0 Disadvantage of this procedure: New hypothesis  new reduced model  new estimation

18 Using contrasts, SPM proceeds as follows: 1.Fit full model to data (once only)  ResMS-file 2.Get user-specified contrast vector/matrix c 3.Compute t- or F-statistic Use contrasts! Full X Reduced X0X0 Mathematically identical to ‘sequential test’, but only one estimation necessary c0c0

19 « Additional variance » : Again Independent contrasts

20 « Additional variance » : Again correlated regressors, for example green: subject age yellow: subject score Testing for the green

21 « Additional variance » : Again correlated contrasts Testing for the red

22 « Additional variance » : Again Entirely correlated contrasts? Empty brain! Testing for the green

23 « Additional variance » : Again If F-test significant?  Could be green or yellow Testing for the green and yellow

24 w t- and F-tests w Improving your model Overview w An example w General linear model revisited w Correlations

25 Example Example Factorial design with 2 factors : modality and category 2 levels for modality (Visual/Auditory) 3 levels for category (3 categories of words) Experimental DesignDesign Matrix V A C1 C2 C3 C1 C2 C3 V A C 1 C 2 C 3

26 Some contrasts V A C 1 C 2 C 3 Design Matrix not orthogonal Interactions ‘Mod x Cat’ are not modelled Test C 1 > C 2 : c = [ 0 0 1 -1 0 0 ] Test V > A : c = [ 1 -1 0 0 0 0 ] [ 0 0 1 0 0 0 ] Test C1,C2,C3 ? (F-test) c = [ 0 0 0 1 0 0 ] [ 0 0 0 0 1 0 ] But: How to test the interaction ‘Mod x Cat’?

27 Modelling the interactions

28 New contrasts V A V A V A Test C1 > C2 : c = [ 1 1 -1 -1 0 0 0] Test V > A : c = [ 1 -1 1 -1 1 -1 0] Test for differences among categories (F-test): [ 1 1 -1 -1 0 0 0] c =[ 0 0 1 1 -1 -1 0] [ 1 1 0 0 -1 -1 0] Test the interaction Mod x Cat (F-test) : [ 1 -1 -1 1 0 0 0] c =[ 0 0 1 -1 -1 1 0] [ 1 -1 0 0 -1 1 0] Design Matrix orthogonal All contrasts are estimable Interactions Mod x Cat modelled C 1 C 1 C 2 C 2 C 3 C 3

29 Adding temporal derivatives V A V A V A Test C1 > C2 ? t-test using: c = [ 1 0 1 0 -1 0 -1 0 0 0 0 0 0] Test C1 different from C2 ? F-test using: c = [ 1 0 1 0 -1 0 -1 0 0 0 0 0 0] [ 0 1 0 1 0 -1 0 -1 0 0 0 0 0] C 1 C 1 C 2 C 2 C 3 C 3 Test V > A ? c = [ 1 0 -1 0 1 0 -1 0 1 0 -1 0 0]

30 w t- and F-tests w Improving your model Overview w An example w General linear model revisited w Correlations

31 An inappropriate model... True signal and observed data (---) Model (green: HRF peaks at 6sec) True signal (blue, peaks at 3sec) Fitting (b1 = 0.2, mean = 0.11) => Test for the green regressor not significant Residual (still contains some signal)

32  =+ Y X   1 = 0.22  2 = 0.11 An inappropriate model... Residual Variance = 0.3 P(Y|  1 = 0): p-value = 0.1 (t-test) P(Y|  1 = 0): p-value = 0.2 (F-test)

33 A better model True signal + observed data Total fit (blue) and partial fit (green & red) => t-value of the green regressor bigger => F-test very significant => t-test of the red regressor very significant Residuals (with smaller variance) Model (green and red) and true signal (blue ---) Red regressor : temporal derivative of the green regressor

34 A better model...  =+ Y X   1 = 0.22  2 = 2.15  3 = 0.11 Residual Var = 0.2 P(Y|  1 = 0): p-value = 0.07 (t-test) P(Y|  1 = 0,  2 = 0): p-value = 0.000001 (F-test)

35 wThe temporal derivative can model shifts up to one second w the canonical HRF and their two derivatives (time and dispersion) are usually appropriate models. w Play around with different models Summary (2)

36 w t- and F-tests w Improving your model Overview w An example w General linear model revisited w Correlations

37 True signal Correlation between regressors Fit (blue : total fit) Residual Model (green and red)

38  =+ Y X   1 = 0.79  2 = 0.85  3 = 0.06 Correlation between regressors Residual var. = 0.3 P(Y|  1 = 0): p-value = 0.08 (t-test) P(Y|  2 = 0): p-value = 0.07 (t-test) P(Y|  1 = 0,  2 = 0): p-value = 0.002 (F-test)

39 Design orthogonality : « explore design » However: when there are more than 2 regressors (C1,C2,C3,...), you may think that there is little correlation (light grey) between them, but C1 + C2 + C3 may be correlated with C4 + C5 Black = correlated White = orthogonal Corr(1,1)Corr(1,2) 12 12 1 2 12 12 1 2

40 w SPM tests for an additional effect  loss of sensitivity if there is correlation between regressors. Summary (3) w In case of correlation, use F-tests over correlated regressors. However, F-tests can make interpretation difficult. w When designing the experiment, take care that contrasts of interest are not correlated with their reduced models.

41 Conclusions w Contrast vectors/matrices are used to test for specific effects w Ensure that you’re not losing sensitivity because of unnecessary correlations in your design.  see talk on ‘event-related fMRI’ w The contrast weights specify a sequential test of two different models (reduced and full)  model comparison

42 Thanks to Jean-Baptiste Poline


Download ppt "SPM short – Mai 2008 Linear Models and Contrasts Stefan Kiebel Wellcome Trust Centre for Neuroimaging."

Similar presentations


Ads by Google