The General Linear Model

33
Brain Mapping Unit The General Linear The General Linear Model Model A Basic Introduction A Basic Introduction Roger Tait ([email protected]) Roger Tait ([email protected])

description

The General Linear Model. A Basic Introduction Roger Tait ([email protected]). Overview. What is imaging data How is data pre-processed Hypothesis testing GLM: simple linear regression Analysis software How to process results. What is imaging data?. Data. A stack of numbers. - PowerPoint PPT Presentation

Transcript of The General Linear Model

Page 1: The General Linear Model

Brain Mapping Unit

The General Linear The General Linear ModelModel

A Basic IntroductionA Basic Introduction

Roger Tait ([email protected])Roger Tait ([email protected])

Page 2: The General Linear Model

Brain Mapping Unit

OverviewOverview

What is imaging dataWhat is imaging data

How is data pre-processedHow is data pre-processed

Hypothesis testingHypothesis testing

GLM: simple linear regressionGLM: simple linear regression

Analysis softwareAnalysis software

How to process resultsHow to process results

Page 3: The General Linear Model

Brain Mapping Unit

What is imaging data?What is imaging data?

Page 4: The General Linear Model

Brain Mapping Unit

DataData

StructuralStructural

fMRIfMRI

A stack of A stack of numbersnumbers

FunctionalFunctional

Page 5: The General Linear Model

Brain Mapping Unit

Multiple DataMultiple Data

subjID voxel1 voxel2 voxel 3 voxel 4 …….. voxel n

1 1227.308541 1472.770249 1417.745632 1701.294758 1288.742729

2 1612.461523 1934.953827 1677.661927 2013.194312 1465.051592

3 1466.264739 1759.517687 1559.769586 1871.723503 1827.678127

4 1499.70072 1799.640864 1842.474418 2210.969302 1316.392368

5 1598.121692 1917.746031 1510.850757 1813.020909 1740.286976

6 1408.066243 1689.679492 1399.393815 1679.272578 1534.459154

7 1555.951487 1867.141784 1588.529211 1588.529211 1516.464089

8 1397.721831 1677.266197 1523.825912 1523.825912 1340.814881

9 1333.659118 1600.390941 1384.217926 1384.217926 1461.281399

10 1453.14966 1743.779592 1558.603977 1558.603977 1406.575083

Page 6: The General Linear Model

Brain Mapping Unit

ReorientationReorientationNativeNative

MNI152MNI152

ReorientedReoriented

Page 7: The General Linear Model

Brain Mapping UnitBasic pre-processing Basic pre-processing (fmri)(fmri)

omprage.niiomprage.nii obrain.niiobrain.nii worest.niiworest.nii

omrest.niiomrest.nii nomrest.niinomrest.nii wnomrest.niiwnomrest.nii

Page 8: The General Linear Model

Brain Mapping UnitBasic pre-processing Basic pre-processing (structural)(structural)

omprage.niiomprage.nii gmomprage.niigmomprage.nii wgmomprage.niiwgmomprage.nii

Page 9: The General Linear Model

Brain Mapping Unit

How does standard space How does standard space data help?data help?

Page 10: The General Linear Model

Brain Mapping Unit

Hypothesis testingHypothesis testing

Statistical inference is commonly done with a test statistic (t, F, …) which has a distribution under H0 mathematically derived.

For example

NB: this assumes that the errors are independent and normally distributed.5%

Parametric Null Distribution

t t = –

SE(–)

^ ^^ ^

Page 11: The General Linear Model

Brain Mapping Unit

Introducing The GLMIntroducing The GLM

Y = X + DATA = MODEL + ERROR

DATA = KNOWN * UNKNOWN + ERROR

Encapsulates: t-test (paired, un-paired), F-Encapsulates: t-test (paired, un-paired), F-test, ANOVA (one-way, two-way, main effects, test, ANOVA (one-way, two-way, main effects, factorial) MANOVA, factorial) MANOVA, ANCOVA, MANCOVA, ANCOVA, MANCOVA, simple regression, linear regression, multiplsimple regression, linear regression, multiple e regression, multivariate regression……regression, multivariate regression……

Page 12: The General Linear Model

Brain Mapping Unit

GLM definition GLM definition

Y = X + Where Where YY is a matrix with a series of is a matrix with a series of

observed measurementsobserved measurements

Where Where XX is a matrix that might be a design is a matrix that might be a design matrixmatrix

Where Where is a matrix containing parameters is a matrix containing parameters to be estimated to be estimated

And And is a matrix containing error or noise is a matrix containing error or noise

Page 13: The General Linear Model

Brain Mapping UnitGLM: Simple Linear GLM: Simple Linear Regression Regression

Y = Y = XX11 + +

Y

X

:: is the Y axis intercept is the Y axis intercept

:: is the gradient of slope is the gradient of slope

Y: the black circles Y: the black circles

: diff between : diff between predicted Y and predicted Y and observed Yobserved Y

Page 14: The General Linear Model

Brain Mapping UnitGLM: Simple Linear GLM: Simple Linear RegressionRegression

This is done by choosing This is done by choosing and and so that the so that the sum of the squares of the estimated errors sum of the squares of the estimated errors ii

22 is as small as possible.is as small as possible.

This is called the This is called the Method of Least SquaresMethod of Least Squares..

ii22 is called the is called the Residual Sum of Squares Residual Sum of Squares (RSS)(RSS)

Y = X1 + ^ ^

Page 15: The General Linear Model

Brain Mapping Unit

GLM exampleGLM example

= mean reaction time + GENDER + AGE

Y = X1 X2X3X4+

DATA = KNOWN * UNKNOWN + ERROR

Page 16: The General Linear Model

Brain Mapping Unit

Dummy VariablesDummy Variables

Continuous variables Continuous variables measurements on a continuous scale measurements on a continuous scale

(age, mRT)(age, mRT)

(-4.01, -0.47, 6.35, -7.06, -7.69, -14.24)(-4.01, -0.47, 6.35, -7.06, -7.69, -14.24)

Dummy VariablesDummy VariablesCode for group membership (disease, Code for group membership (disease,

gender)gender)

controls = 0, patients = 1controls = 0, patients = 1

females = 1, males = -1females = 1, males = -1

Page 17: The General Linear Model

Brain Mapping Unit

UsageUsage

Hypothesis tests with GLM can be Hypothesis tests with GLM can be multivariate or several independent multivariate or several independent univariate testsunivariate tests

In multivariate tests the columns of Y are In multivariate tests the columns of Y are tested togethertested together

In univariate tests the columns of Y are In univariate tests the columns of Y are tested independently (multiple univariate tested independently (multiple univariate tests with the same design matrix)tests with the same design matrix)

Page 18: The General Linear Model

Brain Mapping Unit

fMRI model specificationfMRI model specification

silent naming tasksilent naming task

The model

BOLD signal

Page 19: The General Linear Model

Brain Mapping Unit

Actual retrieved dataActual retrieved data

Page 20: The General Linear Model

Brain Mapping Unit

fmri analysis with FSLfmri analysis with FSL

Page 21: The General Linear Model

Brain Mapping UnitStructural analysis with Structural analysis with CamBACamBA

groupsex weight

Page 22: The General Linear Model

Brain Mapping Unit

Structural analysis outputStructural analysis output

Page 23: The General Linear Model

Brain Mapping Unit

Where are my clusters?Where are my clusters?

here is a big cluster

here is a big cluster

Page 24: The General Linear Model

Brain Mapping Unit

Where is the cluster I am Where is the cluster I am interested in?interested in?

position mouse cursor here

cluster location information shown here

Page 25: The General Linear Model

Brain Mapping Unit

How do my clusters help How do my clusters help me?me?

Page 26: The General Linear Model

Brain Mapping Unit

Statistical TestingStatistical Testing

Convert cluster into a binary maskConvert cluster into a binary mask

Overlay mask on subject dataOverlay mask on subject data

Extract voxel intensitiesExtract voxel intensities

Do some statistical analysis to get more Do some statistical analysis to get more information from your datainformation from your data

Page 27: The General Linear Model

Brain Mapping Unit

Correlation with behaviourCorrelation with behaviour

p>0.05 close but cluster Pos_001 does not significantly correlate with behaviour HIT1

for cluster Pos_002

Page 28: The General Linear Model

Brain Mapping Unit

Other AnalysesOther Analyses

two-sample t-test

one-sample t-test

simple regression

Difference between means

different from 0

Linear relationship between 2 variables

Page 29: The General Linear Model

Brain Mapping Unit

What else can I do to find What else can I do to find out more about my data?out more about my data?

Page 30: The General Linear Model

Brain Mapping Unit

Other types of analysesOther types of analyses

Factorial designsFactorial designsPermits analysis of multiple time dataPermits analysis of multiple time dataShowsShows

Main effects of Factor 1 (time)Main effects of Factor 1 (time)Main effects of Factor 2 (group)Main effects of Factor 2 (group)Interaction between Factor 1 and Factor Interaction between Factor 1 and Factor

22

Page 31: The General Linear Model

Brain Mapping Unit

Useful software packageUseful software package

CamBA – CambridgeCamBA – Cambridge http://www-bmu.psychiatry.cam.ac.uk/http://www-bmu.psychiatry.cam.ac.uk/

software/software/

FSL Randomise – OxfordFSL Randomise – Oxford http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomisehttp://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise

SPM8 – UCLSPM8 – UCL http://www.fil.ion.ucl.ac.uk/spm/software/http://www.fil.ion.ucl.ac.uk/spm/software/

spm8/spm8/

Page 32: The General Linear Model

Brain Mapping Unit

In summaryIn summary

The GLM allows us to summarize a wide The GLM allows us to summarize a wide variety of research outcomes by specifying variety of research outcomes by specifying the exact equation that best summarizes the the exact equation that best summarizes the data for a study. If the model is wrongly data for a study. If the model is wrongly specified, the estimates of the coefficients specified, the estimates of the coefficients (the beta values) are likely to be biased (i.e. (the beta values) are likely to be biased (i.e. wrong) and the resulting equation will not wrong) and the resulting equation will not describe the data accurately. describe the data accurately.

In complex situations (e.g. cognitive fMRI In complex situations (e.g. cognitive fMRI paradigms), this model specification paradigms), this model specification problem can be a serious and difficult one problem can be a serious and difficult one

Page 33: The General Linear Model

Brain Mapping Unit

Any questions?Any questions?