2nd level analysis – design matrix, contrasts and inference

Slides:



Advertisements
Similar presentations
Statistical Inference
Advertisements

Hierarchical Models and
The SPM MfD course 12th Dec 2007 Elvina Chu
Basis Functions. What’s a basis ? Can be used to describe any point in space. e.g. the common Euclidian basis (x, y, z) forms a basis according to which.
2nd level analysis in fMRI
Camilla Clark, Catherine Slattery
General Linear Model L ύ cia Garrido and Marieke Schölvinck ICN.
General Linear Model Beatriz Calvo Davina Bristow.
2nd level analysis – design matrix, contrasts and inference
1st level analysis - Design matrix, contrasts & inference
1 st Level Analysis: design matrix, contrasts, GLM Clare Palmer & Misun Kim Methods for Dummies
SPM 2002 C1C2C3 X =  C1 C2 Xb L C1 L C2  C1 C2 Xb L C1  L C2 Y Xb e Space of X C1 C2 Xb Space X C1 C2 C1  C3 P C1C2  Xb Xb Space of X C1 C2 C1 
Outline What is ‘1st level analysis’? The Design matrix
Design matrix, contrasts and inference
Classical inference and design efficiency Zurich SPM Course 2014
Group analyses Wellcome Dept. of Imaging Neuroscience University College London Will Penny.
CHAPTER 3 ECONOMETRICS x x x x x Chapter 2: Estimating the parameters of a linear regression model. Y i = b 1 + b 2 X i + e i Using OLS Chapter 3: Testing.
Statistical Inference
1 Chapter 3 Multiple Linear Regression Ray-Bing Chen Institute of Statistics National University of Kaohsiung.
Group analyses of fMRI data Methods & models for fMRI data analysis 26 November 2008 Klaas Enno Stephan Laboratory for Social and Neural Systems Research.
1st level analysis: basis functions and correlated regressors
Lorelei Howard and Nick Wright MfD 2008
1st Level Analysis Design Matrix, Contrasts & Inference
2nd Level Analysis Jennifer Marchant & Tessa Dekker
2nd level analysis – design matrix, contrasts and inference
Methods for Dummies Second level analysis
With many thanks for slides & images to: FIL Methods group, Virginia Flanagin and Klaas Enno Stephan Dr. Frederike Petzschner Translational Neuromodeling.
Contrasts (a revision of t and F contrasts by a very dummyish Martha) & Basis Functions (by a much less dummyish Iroise!)
With a focus on task-based analysis and SPM12
Brain Mapping Unit The General Linear Model A Basic Introduction Roger Tait
SPM5 Tutorial Part 2 Tiffany Elliott May 10, 2007.
SPM Course Zurich, February 2015 Group Analyses Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London With many thanks to.
SPM short course – Oct Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
Wellcome Dept. of Imaging Neuroscience University College London
Contrasts & Statistical Inference
Methods for Dummies Second level Analysis (for fMRI) Chris Hardy, Alex Fellows Expert: Guillaume Flandin.
General Linear Model and fMRI Rachel Denison & Marsha Quallo Methods for Dummies 2007.
Statistical Inference Christophe Phillips SPM Course London, May 2012.
FMRI Modelling & Statistical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM Course Chicago, Oct.
Idiot's guide to... General Linear Model & fMRI Elliot Freeman, ICN. fMRI model, Linear Time Series, Design Matrices, Parameter estimation,
The General Linear Model
SPM short – Mai 2008 Linear Models and Contrasts Stefan Kiebel Wellcome Trust Centre for Neuroimaging.
1 st level analysis: Design matrix, contrasts, and inference Stephane De Brito & Fiona McNabe.
The general linear model and Statistical Parametric Mapping I: Introduction to the GLM Alexa Morcom and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B.
SPM and (e)fMRI Christopher Benjamin. SPM Today: basics from eFMRI perspective. 1.Pre-processing 2.Modeling: Specification & general linear model 3.Inference:
The general linear model and Statistical Parametric Mapping II: GLM for fMRI Alexa Morcom and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B Poline.
SPM short course – Mai 2008 Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
Chapter 7. Classification and Prediction
Group Analyses Guillaume Flandin SPM Course London, October 2016
Contrast and Inferences
The general linear model and Statistical Parametric Mapping
2nd Level Analysis Methods for Dummies 2010/11 - 2nd Feb 2011
Statistical Inference
A very dumb dummy thinks about modelling, contrasts, and basis functions. ?
Statistical Inference
Random Effects Analysis
and Stefan Kiebel, Rik Henson, Andrew Holmes & J-B Poline
The SPM MfD course 12th Dec 2007 Elvina Chu
Methods for Dummies Second-level Analysis (for fMRI)
Contrasts & Statistical Inference
Wellcome Dept. of Imaging Neuroscience University College London
Rachel Denison & Marsha Quallo
The general linear model and Statistical Parametric Mapping
Hierarchical Models and
Wellcome Dept. of Imaging Neuroscience University College London
Contrasts & Statistical Inference
MfD 04/12/18 Alice Accorroni – Elena Amoruso
WellcomeTrust Centre for Neuroimaging University College London
Statistical Inference
Contrasts & Statistical Inference
Presentation transcript:

2nd level analysis – design matrix, contrasts and inference Alexander Leff

Overview Why do 2nd-level analyses? Image based view of spm stats. Practical examples of 2nd level design matrices. Correction for multiple comparisons.

2nd Level inference Study Group Sample Group Sampling Inference In order for inferences to be valid about the study group (the population you want you findings to pertain to), the sample population (those who you actually study) should be representatively drawn from the study population.

Theoretical basis for 2nd level analyses Depends on whether you want to generalize your findings beyond the subjects you have studied (sample group). Usually this is the case, however: Karl’s ‘talking dog’. In a human, this happens: In humans, this happens. In this group of patients… : In patients…

1st level design matrix: 6 sessions per subject

A regressor, X, = timeseries of expected activation. 15 auditory contrasts 2 target contrasts 6 movement parameters A regressor, X, = timeseries of expected activation. A = convolved with HRF B = not convolved Data, Y Y = X + e Betas are calculated for each column of the design matrix 23 betas x 6 sessions = 138 + 6 constants = 144 beta images. A B

The following images are created each time an analysis is performed (1st or 2nd level) beta images (with associated header), images of estimated regression coefficients (parameter estimate). Combined to produce con. images. mask.img This defines the search space for the statistical analysis. ResMS.img An image of the variance of the error (NB: this image is used to produce spmT images). RPV.img The estimated resels per voxel (not currently used).

1st-level (within-subject) ^ b2 b3 b4 b5 b6 Beta images contain values related to size of effect. A given voxel in each beta image will have a value related to the size of effect for that explanatory variable. 1 ^ 2 3 4 5 6 w = within-subject error The ‘goodness of fit’ or error term is contained in the ResMS file and is the same for a given voxel within the design matrix regardless of which beta(s) is/are being used to create a con.img. Design efficiency

Mask.img Calculated using the intersection of 3 masks: 1) user specified, 2) Implicit (if a zero in any image then masked for all images) default = yes, 3) Thresholding which can be i) none, ii) absolute, iii) relative to global (80%).

Specify this contrast for each session

Contrast 1: Vowel - baseline

Beta value = % change above global mean. In this design matrix there are 6 repetitions of the condition so these need to be summed. Con. value = summation of all relevant betas.

ResMS.img = residual sum of squares or variance image and is a measure of within-subject error at the 1st level or between-subject error at the 2nd. Con. value is combined with ResMS value at that voxel to produce a T statistic or spm.T.img.

spmT.img Thresholded using the results button.

spmT.img and corresponding spmF.img

ci = voxel value in contrast image at voxel i Con = contrast applied to design matrix

ci = voxel value in contrast image at voxel i ConT = contrast applied to design matrix C = Constant term

Efficiency term Contrast specific (See Tom Jenkins’/ Paul Bentley’s slides). ci = voxel value in contrast image at voxel i ConT = contrast applied to design matrix C = Constant term

ci = voxel value in contrast image at voxel i ConT = contrast applied to design matrix C = Constant term

ci = voxel value in contrast image at voxel i ConT = contrast applied to design matrix C = Constant term

Summary beta images contain information about the size of the effect of interest. Information about the error variance is held in the ResMS.img. beta images are linearly combined to produce relevant con. images. The design matrix, contrast, constant and ResMS.img are subjected to matrix multiplication to produce an estimate of the st.dev. associated with each voxel in the con.img. The spmT.img are derived from this and are thresholded in the results step.

Contrast 2: Vowel - Tones

Vowel – baseline Vowel - baseline Tone - baseline Vowel - Tone Contrast images for the two classes of stimuli versus baseline and versus each other (linear summation of all relevant betas)

Vowel - baseline Tone - baseline Vowel - Tone spmT images for the two classes of stimuli versus baseline and versus each other (these are not linearly related as the st.dev. of the voxel value in each con.img varies with each contrast).

2nd level analysis – what’s different? Maths is identical. Con.img at the first level are output files, at the second level they are both input and output files. 1st level: variance is within subject, 2nd level: variance is between subject. Different types of design matrix (3 examples).

Specify 2nd level: One-sample t-test Simplest example, most parsimonious.

Group mask Single subject mask NB: Mask file will only include voxels common to all subjects.

Estimate: Results: Vowel – Tone contrast.

beta.img con.img NB: beta and con images are identical.

spmT.img Plot from voxel shows error variance.

Vowels Formants Tones Specify 2nd level: Full factorial More than one contrast per subject, can cause a problem with sphericity assumptions. Can analyse systematically: simple main effects then interactions. Mask one contrast with another etc.

Specify 2nd level: One-sample t-test Simplest example, most parsimonious

Test with a conjunction term: Which voxels are activated in both contrasts Vowels Formants Tones Plot:

Specify 2nd level: One sample t-test with a covariate added. Test correlations between task specific activations and some other measure (age, performance, etc.). Vectors added here. Needs to be mean corrected by hand. (in this case age squared then mean corrected).

Main effect of grip (1st level analysis event related Correlation between grip and age of subject design: grip vs. rest)

This plot correlates betas related to grip (y-axis) with a measure of age (x-axis)

2nd level analysis summary Many different ways of entering the contrast images of interest generated by the first level design matrix. Choice depends primarily on: Initial study design. Parsimonious models vs. more complex ones.

volume = defined by mask.img Voxels = volume/8: FDR-corr Resels = calculated from the estimated smoothness (FWHM): FEW-corr

Small volume correction: box, sphere, image.

Canonical 152 T1.img STG mask (created in MRIcro. NB: must reorient origin in spm).

SVC summary Degrees of freedom. p value associated with t and Z scores is dependent on 2 parameters: Degrees of freedom. How you choose to correct for multiple comparisons.

Sources Rik Henson’s slides. MfD past and present. SPM manual (D:\spm5\man). Will Penny.