Presentation is loading. Please wait.

Presentation is loading. Please wait.

The General Linear Model

Similar presentations


Presentation on theme: "The General Linear Model"— Presentation transcript:

1 The General Linear Model
Ramiro & Sinéad

2 The fMRI experiment: Desired End-Point
Statistical parametric map (SPM) Statistical Inference

3 The fMRI experiment: Start Point
One Scanner ; One Experiment ??? ; One Brain

4 An fMRI experiment Catch Jellyfish Scanner Bed Condition 1:
Word Generation Jellyfish Screen Noun is presented Verb is generated Catch Scanner Bed Healthy Volunteer

5 An fMRI experiment Fry Burger Scanner Bed Condition 1: Word Generation
Screen Noun is presented Verb is generated Fry Scanner Bed Healthy Volunteer

6 An fMRI experiment Swim Swim Scanner Bed Condition 2: Word Shadowing
Screen Verb is presented Verb is shadowed Swim Scanner Bed Healthy Volunteer

7 An fMRI experiment Strut Strut Scanner Bed Condition 2: Word Shadowing
Screen Verb is presented Verb is shadowed Strut Scanner Bed Healthy Volunteer

8 An fMRI experiment + Scanner Bed Baseline No Stimuli Screen
Cross-hair presented Scanner Bed Healthy Volunteer

9 -> 6.7 million data points every 4.5 mins!!
An fMRI experiment etc. 4th TR 3rd TR 2nd TR 1st TR Slides courtesy of Brainvoyager Innovation BV Note: This is not data from the word generation experiment described above. Illustrative purposes only! Time Series Note: if your TR was sec; then this run would have had a duration of approximately 4 and a half minutes -> 6.7 million data points every 4.5 mins!! Example Experiment 12 slices * 64 voxels x 64 voxels = 49,152 voxels 1 voxel = 136 time points 1 run = 6.7 million data points 1 experiment = multiple runs; 6.7 million * ?

10 Option 1 We could, in principle, analyze data by voxel surfing: move the cursor over different areas and see if any of the time courses look interesting Slice 9, Voxel 0, 0 Even where there’s no brain, there’s noise Slice 9, Voxel 22, 7 The signal is much higher where there is brain, but there’s still noise Slice 9, Voxel 9, 27 Here’s a voxel that responds well in condition 1 and condition 2 Slides courtesy of Brainvoyager Innovation BV Here’s one that responds well to condition 1 stimuli only Slice 9, Voxel 13, 41

11 GLM: ‘Voxel’ x ‘Voxel’ Time-Series Analysis
View 1: A series of volumes (scans, 3D “images”) View 2: A multiple voxel time series Standard hypothesis-driven statistical analysis (e.g. GLM) goes with view 2 since it is applied independently for each voxel time course (“voxel-wise” statistical analysis). © Brainvoyager Innovation BV

12 fMRI Analysis: Overview of SPM
Statistical parametric map (SPM) Image time-series Kernel Design matrix Realignment Smoothing General linear model Statistical inference Gaussian field theory Normalisation p <0.05 Template Parameter estimates

13 Summary of Regression Linear regression models the linear relationship between a single dependent variable, Y, and a single independent variable, X, using the equation: The regression coefficient, β, reflects how much of an effect X has on Y. ε is the error term and is assumed to be independently, identically, and normally distributed (mean 0 and variance σ2) Y = βX + c + ε

14 Summary of Regression Multiple regression is used to determine the effect of a number of independent variables, X1, X2, X3 etc, on a single dependent variable, Y. The different X variables are combined in a linear way and each has its own regression coefficient: The β parameters reflect the independent contribution of each independent variable, X, to the value of the dependent variable, Y. i.e. the amount of variance in Y that is accounted for by each X variable after all the other X variables have been accounted for. Y = β1X1 + β2X2 +…..+ βLXL + ε

15 Regression and the GLM As seen last week, regression and correlations methods form the basis of the GLM; Moreover, the GLM can essentially be viewed as ‘an extension of linear multiple regression for a single dependent variable’. Multiple Regression only looks at ONE dependent (Y) variable, whereas, GLM allows you to analyse data from one voxel as a linear combination of your predictors ANOVA, t-test, F-test, etc. are also forms of the GLM.

16 Matrix Formulation Y1 = X11β1 +…+X1lβl +…+ X1LβL + ε1
Write out equation for each observation of variable Y from 1 to J: Y1 = X11β1 +…+X1lβl +…+ X1LβL + ε1 Yj = Xj1β1 +…+Xjlβl +…+ XjLβL + εj YJ = XJ1β1 +…+XJlβl +…+ XJLβL + εJ Time Can turn these simultaneous equations into matrix form to get a single equation: Y1 Yj YJ = X11 … X1l … X1L Xj1 … X1l … X1L β1 βj βJ + ε1 εj εJ Y = X x β ε Observed data Design Matrix Parameters Error = x

17 y = Xβ + ε Observed data; fMRI time course (voxel x voxel)
Image courtesy of Brainvoyager Innovation BV Observed data; fMRI time course (voxel x voxel) © Brainvoyager Innovation BV

18 y = Xβ + ε Image courtesy of Brainvoyager Innovation BV Design Matrix

19 functions, explanatory
y = Xβ + ε Image courtesy of Brainvoyager Innovation BV Predictors Also referred to as: regressors, reference functions, explanatory variables, covariates, basic functions

20 y = Xβ + ε Beta Weights/ Coefficients

21 y = Xβ + ε Error/ Residuals

22 The GLM y = Xβ + ε

23 fMRI Analysis: Overview of SPM
Statistical parametric map (SPM) Image time-series Kernel Design matrix Realignment Smoothing General linear model Statistical inference Gaussian field theory Normalisation p <0.05 Template Parameter estimates

24 Single Voxel Time Series
The Observed Data y = Xβ + ε Time Single Voxel Time Series GLM = Mass Univariate ‘Voxel X Voxel’ Time Series Analysis The observed fMRI time course in a specific voxel (= the dependent variable)

25 = y y = Xβ + ε The Observed Data … time BOLD signal y1 y2 yN
Design Matrix Contains/embodies all available knowledge. Note: a predictor time course is typically obtained by the convolution of a condition box-car time course with a standard HRF. Each predictor time course gets an associated coefficient or beta weight. This quantifies each predictors’ contribution in explaining the voxel’s time course (y) -> The beta weight of a condition predictor quantifies the contribution of its time course in explaining the voxel’s time course.

26 Q: what might our specified predictors be in this experiment?
The Design Matrix y = Xβ + ε X = a set of specified predictors (the design matrix); each of which has unique expected signal time course. Q: what might our specified predictors be in this experiment? »The GLM models the expected signal time courses for individual conditions.

27 The Design Matrix + + = + 1 × X1 X2 2 × 3 × X3
Provides the model of the expected signal time courses for individual conditions Expected signal time course for our 1st predictor (X1) = design matrix X1 1 × Expected signal time course for our 2nd predictor (X2) + fMRI signal X2 2 × + residuals ‘ X1, X2 and X3 are a series of know hypotheses about what we think is going on in the brain. Nothing unknown about the as we have put them in there. i.e. the time series that we would have for a voxel that’s into generating words, that’s into words in general, or that doesn’t really care about words. Observed Data: want to try to model this as a linear combination of the hypothetical time series, i.e. the time series that we would have for a voxel that’s into generating words, that’s into words in general, or that doesn’t really care about words.’ + 3 × X3 Time a “constant” predictor (X3) is required to fit the base level of the signal time course © Brainvoyager Innovation BV

28 The Design Matrix The GLM models the expected signal time courses for individual conditions. > A ‘model’ consists of a set of assumptions about what these time series look like for each of the specific conditions or categories of data. We therefore have various ‘knows’ which we can put into our model: 1. The expected signal time course for each of our individual conditions 2. The expected signal time course of confounds in the data

29 X: Predictors / Design Matrix
The Design Matrix + 1 × 2 × 3 × X1 X2 X3 X: Predictors / Design Matrix Y: Observed Data + Error = Time ‘Observed Data: want to try to model this as a linear combination of the hypothetical time series, i.e. the time series that we would have for a voxel that’s into generating words, that’s into words in general, or that doesn’t really care about words’. Images: © Brainvoyager Innovation BV fMRI signal residuals y1 = x1*β1 + x2*β2 + x3*β3 + ε1 © Brainvoyager Innovation BV A linear combination of the predictors

30 Aside

31 X: Predictors / Design Matrix
Hemodynamic response function Y: Observed Data + Error = 1 × + 2 × + 3 × Time X1 X2 X3 Note: a predictor time course is typically obtained by the convolution of a condition box-car time course with a standard HRF. Images: © Brainvoyager Innovation BV fMRI signal residuals X: Predictors / Design Matrix

32 Hemodynamic response function
Neural pathway Hemodynamics MR scanner -> Reshape (convolve) regressors to resemble HRF HRF basic function Image 1: Brainvoyager Innovations BV

33 The Design Matrix = 1 × + 2 x + 3 x + X1 X2 X3 fMRI signal = data
Time 1 × + 2 x + 3 x + X1 X2 X3 fMRI signal = data design matrix = model residuals = error So far, we have only included (in our design matrix) the predicted signal time series for our ‘effects of interest’. We also have information about confounds in our data (i.e. ‘effects of NO interest’ such as head movement…). We need to add these additional predictor time courses in order to improve our model of the data (& thus reduce the error)

34 The Design Matrix We therefore have various ‘knows’ which we can put into our model: 1. The expected signal time course for each of our individual conditions 2. The expected signal time course of confounds in the data The Design Matrix Needs to Model the Expected Signal Time Course for: Effects of Interest each individual condition (X1, X2 …) a ‘constant’ predictor (X3) The Design Matrix thus embodies all available knowledge about experimentally controlled factors and potential confounds Effects of No Interest (i.e. confounds): each physiological confounds – head movement.. each psychological confounds – ∆ stress, attention… Scanner Drift…

35 X: The Design Matrix The design matrix should include everything
that might explain the data. Conditions: Effects of interest Subjects Global activity or movement More complete models make for lower residual error, better stats, and more accurate estimates of the effects of interest.

36 y = Xβ + ε The GLM in Matrix Notation Observed data The observed fMRI
time course in a specific voxel (dependent variable)

37 y = Xβ + ε The General Linear Model Observed data = Predictors
Model is specified by: Design matrix X Assumptions about e y = Xβ + ε Embodies all available knowledge about experimentally controlled factors and potential confounds Observed data = Predictors (the design matrix) Note: A constant predictor is required to fit the base level of the signal time course. Predictions can also be referred to as: reference functions regressors explanatory variables covariates basic functions Design Matrix Contains/embodies all available knowledge. Note: a predictor time course is typically obtained by the convolution of a condition box-car time course with a standard HRF. Each predictor time course gets an associated coefficient or beta weight. This quantifies each predictors’ contribution in explaining the voxel’s time course (y) -> The beta weight of a condition predictor quantifies the contribution of its time course in explaining the voxel’s time course. A set of specified predictors (each of which has a unique expected signal time course) The observed fMRI time course in a specific voxel (dependent variable)

38 y = Xβ + ε The General Linear Model Observed data = Predictors
Model is specified by: Design matrix X Assumptions about e y = Xβ + ε = Everything that we know Observed data = Predictors But what about everything that we DON’T know??? The observed fMRI time course in a specific voxel (dependent variable) A set of specified predictors (each of which has a unique expected signal time course) “The Unknowns”: The Beta Values The Error (Residuals)

39 The General Linear Model
y = Xβ + ε 1 × 2 × 3 × estimate = Time 1 × + 2 x + 3 x + X1 X2 X3 fMRI signal = data design matrix = model residuals = error -> Each predictor time course gets an associated coefficient or beta weight. -> The beta weight of a condition predictor quantifies the contribution of it’s time course (X1; X2; X3) in explaining the voxel’s time course (y).

40 Generation Shadowing Baseline
The Model We have our set of hypothetical time-series The estimation entails finding the parameter values such that the linear combination of these hypothetical time series ”best” fits the data. Generation Shadowing Baseline Measured X1 X2 X3 ”Known” + β3* ”Unknown” parameters + β2* β1* want to estimate (or want SPM to estimate) or model this observed time series as a linear combination of the hypothetical time series.

41 Generation Shadowing Baseline
Parameter Estimation Finding the ”best” parameter values For a given voxel (time-series) we try to figure out just what type that is by ”modelling” it as a linear combination of the hypothetical time-series. 4 3 2 1 1 2 1 β1* + β2* + β3* Generation Shadowing Baseline

42 Generation Shadowing Baseline
Parameter Estimation Finding the ”best” parameter values For a given voxel (time-series) we try to figure out just what type of voxel this is by ”modelling” it as a linear combination of the hypothetical time-series. 4 3 2 1 1 2 1 β1* + β2* + β3* Generation Shadowing Baseline Not brilliant 3

43 Generation Shadowing Baseline
Parameter Estimation Finding the ”best” parameter values For a given voxel (time-series) we try to figure out just what type of voxel this is by ”modelling” it as a linear combination of the hypothetical time-series. 4 3 2 1 1 2 1 β1* + β2* + β3* Generation Shadowing Baseline Neither that 1 4

44 Generation Shadowing Baseline
Parameter Estimation SSE = (yi – i) 2 = (yi – Xβ) 2 Finding the ”best” parameter values For a given voxel (time-series) we try to figure out just what type of voxel this is by ”modelling” it as a linear combination of the hypothetical time-series. 4 3 2 + β2* + β1* 1 β0* + β3* β1* 2 Generation Shadowing Baseline Cool! 0.83 0.16 2.98

45 Generation Shadowing Baseline
Parameter Estimation Finding the ”best” parameter values And the nice thing is that the same model fits all the time-series, only with different parameters. 3 2 1 + β2* + β1* 1 β0* + β3* β1* 2 β3* + β1* + β2* Generation Shadowing Baseline 0.68 0.82 2.17 In other words:

46 Generation Shadowing Baseline
Parameter Estimation Finding the ”best” parameter values And the nice thing is that the same model fits all the time-series, only with different parameters. 3 2 1 + β2* + β1* 1 β0* + β3* β1* 2 β0* + β1* + β2* Generation Shadowing Baseline 0.03 0.06 2.04 Doesn’t care:

47 Same model for all voxels. Different parameters for each voxel.
Parameter Estimation Plots the estimated beta 1’s over the whole brain Same model for all voxels. Different parameters for each voxel. beta_0001.img ... Time-series beta_0002.img ... beta_0003.img

48 So far…

49 y = Xβ + ε The GLM in Matrix Notation Observed data The observed fMRI
Model is specified by: Design matrix X Assumptions about e y = Xβ + ε Observed data Design Matrix Contains/embodies all available knowledge. Note: a predictor time course is typically obtained by the convolution of a condition box-car time course with a standard HRF. Each predictor time course gets an associated coefficient or beta weight. This quantifies each predictors’ contribution in explaining the voxel’s time course (y) -> The beta weight of a condition predictor quantifies the contribution of its time course in explaining the voxel’s time course. The observed fMRI time course in a specific voxel (dependent variable)

50 The Design Matrix Needs to Model the Expected Signal Time Course for:
The General Linear Model Model is specified by: Design matrix X Assumptions about e y = Xβ + ε The Design Matrix thus embodies all available knowledge about experimentally controlled factors and potential confounds Observed data = Predictors (the design matrix) Note: A constant predictor is required to fit the base level of the signal time course. Predictions can also be referred to as: reference functions regressors explanatory variables covariates basic functions Design Matrix Contains/embodies all available knowledge. Note: a predictor time course is typically obtained by the convolution of a condition box-car time course with a standard HRF. Each predictor time course gets an associated coefficient or beta weight. This quantifies each predictors’ contribution in explaining the voxel’s time course (y) -> The beta weight of a condition predictor quantifies the contribution of its time course in explaining the voxel’s time course. A set of specified predictors (each of which has a unique expected signal time course) The Design Matrix Needs to Model the Expected Signal Time Course for: The observed fMRI time course in a specific voxel (dependent variable) Effects of Interest each individual condition (X1, X2 …) a ‘constant’ predictor (X0) Effects of No Interest (i.e. confounds): each physiological confounds – head movement.. each psychological confounds – ∆ stress, attention… Scanner Drift…

51 Each predictor time course (X) gets an estimated beta weight.
The General Linear Model Model is specified by: Design matrix X Assumptions about e y = Xβ + ε Each predictor time course (X) gets an estimated beta weight. This weight attempts to quantify the specific predictors contribution to the specific voxels time course (Y). Observed data = Predictors (the design matrix) * Parameters A set of specified predictors (each of which has a unique expected signal time course) The observed fMRI time course in a specific voxel (dependent variable) Quantifies how much each predictor contributes to the observed data i.e. the voxels’ time course (y) Referred to as association coefficients or beta weights (β)

52 y = Xβ + ε The General Linear Model Observed data = Predictors
Model is specified by: Design matrix X Assumptions about e y = Xβ + ε Observed data = Predictors (the design matrix) * Parameters + Error The observed fMRI time course in a specific voxel (dependent variable) A set of specified predictors (each of which has a unique expected signal time course) Quantifies how much each predictor contributes to the observed data i.e. the voxels’ time course (y) Variance in the data not explained by the model (Represents the mismatch between the observed data and the described Model).

53 y = Xβ + ε Error We assume that the errors are normally distributed:
Model is specified by: Design matrix X Assumptions about e y = Xβ + ε We assume that the errors are normally distributed: Assumes we have the same error/uncertainty in each and every measurement point And that there is no correlation between the errors in the different voxels.

54 Get an estimate of the residual error;
Model is specified by: Design matrix X Assumptions about e y = Xβ + ε Get the parameter estimates for each and every regressor/predictor (beta weights) ; Get an estimate of the residual error; Enables you to estimate the variance in the data (for that particular time series)

55 fMRI Analysis: Overview of SPM
Statistical parametric map (SPM) Image time-series Kernel Design matrix Realignment Smoothing General linear model Statistical inference Gaussian field theory Normalisation p <0.05 Template Parameter estimates

56 Make inferences about effects of interest
Modelling the Measured Data Make inferences about effects of interest Why? How? Decompose the data into effects and error Form statistic using estimates of effects and error Data Linear Model Stimulus Function Effect Estimate Statistic Error Estimate Once we have obtained the βs & error at each voxel we can use these to do various statistical tests

57 Thanks to… Previous MfD talks: Rachel Denison & Marsha Quallo (2007)
Lύcia Garrido & Marieke Schölvinck (2006) Elliot Freeman (2005) Davina Bristow & Beatriz Calvo (2004) Brainvoyager Innovation BV (for permission to use images; Jesper Andersson. Modelling Neuroimaging Data Using the General Linear Model (GLM©Karl); Justin Chumbley & Maria Joao


Download ppt "The General Linear Model"

Similar presentations


Ads by Google