Скачать презентацию 2 nd level analysis design matrix contrasts Скачать презентацию 2 nd level analysis design matrix contrasts

b8b5bd6db650aadaece278a2518707af.ppt

  • Количество слайдов: 31

2 nd level analysis – design matrix, contrasts and inference Irma Kurniawan MFD Jan 2 nd level analysis – design matrix, contrasts and inference Irma Kurniawan MFD Jan 2009

Today’s menu • • • Fixed, random, mixed effects First to second level analysis Today’s menu • • • Fixed, random, mixed effects First to second level analysis Behind button-clicking: Images produced and calculated The buttons and what follows. . Contrast vectors, Levels of inference, Global effects, Small Volume Correction • Summary

Fixed vs. Random Effects • Subjects can be Fixed or Random variables • If Fixed vs. Random Effects • Subjects can be Fixed or Random variables • If subjects are a Fixed variable in a single design matrix (SPM “sessions”), the error term conflates within- and between-subject variance – But in f. MRI (unlike PET) the between-scan variance is normally much smaller than the between-subject variance Multi-subject Fixed Effect model Subject 1 Subject 2 Subject 3 • If one wishes to make an inference from a subject sample to the population, one needs to treat subjects as a Random variable, and needs a proper mixture of within- and between-subject variance • Mixed models: the experimental factors are fixed but the ‘subject’ factor is random. • In SPM, this is achieved by a two-stage procedure: 1) (Contrasts of) parameters are estimated from a (Fixed Effect) model for each subject 2) Images of these contrasts become the data for a second design matrix (usually simple t-test or ANOVA) Subject 4 Subject 5 Subject 6 error df ~ 300

Two-stage “Summary Statistic” approach 2 nd-level (between-subject) 1 st-level (within-subject) ^ b 2 ^ Two-stage “Summary Statistic” approach 2 nd-level (between-subject) 1 st-level (within-subject) ^ b 2 ^ ( 2) ^ b 3 ^ ( 3) ^ b 4 ^ ( 4) ^ b 5 ^ ( 5) ^ b 6 ^ ( 6) contrast images of cbi ^ b 1 ^ ( 1) One-sample t-test N=6 subjects (error df =5) p < 0. 001 (uncorrected) ^ b SPM{t} pop ^ w = within-subject error WHEN special case of n independent observations per subject: var(bpop) = 2 b / N + 2 w / Nn

Relationship between 1 st & 2 nd levels • 1 st-level analysis: Fit the Relationship between 1 st & 2 nd levels • 1 st-level analysis: Fit the model for each subject. Typically, one design matrix per subject • Define the effect of interest for each subject with a contrast vector. • The contrast vector produces a contrast image containing the contrast of the parameter estimates at each voxel. Contrast 1 Subject 1 Con image for contrast 1 for subject 1 Subject 2 • 2 nd-level analysis: Feed the contrast images into a GLM that implements a statistical test. Contrast 2 Con image for contrast 1 for subject 2 Con image for contrast 2 for subject 1 Con image for contrast 2 for subject 2 You can use checkreg button to display con images of different subjects for 1 contrast and eye-ball if they show similar activations

Similarities between 1 st & 2 nd levels • Both use the GLM model/tests Similarities between 1 st & 2 nd levels • Both use the GLM model/tests and a similar SPM machinery • Both produce design matrices. • The rows in the design matrices represent observations: – 1 st level: Time (condition onsets); within-subject variability – 2 nd level: subjects; between-subject variability • The columns represent explanatory variables (EV): – 1 st level: All conditions within the experimental design – 2 nd level: The specific effects of interest

Similarities between 1 st & 2 nd levels • The same tests can be Similarities between 1 st & 2 nd levels • The same tests can be used in both levels (but the questions are different) • . Con images: output at 1 st level, both input and output at 2 nd level • 1 st level: variance is within subject, 2 nd level: variance is between subject. • There is typically one 1 st-level design matrix per subject, but multiple 2 nd level design matrices for the group – one for each statistical test. B 1 B 2 B 3 A 1 1 2 3 A 2 4 5 6 For example: 2 X 3 design between variable A and B. We’d have three design matrices (entering 3 different sets of con images from 1 st level analyses) for 1) main effect of A 2) main effect of B 3) interaction Ax. B.

Difference from behavioral analysis • The ‘ 1 st level analysis’ typical to behavioural Difference from behavioral analysis • The ‘ 1 st level analysis’ typical to behavioural data is relatively simple: – A single number: categorical or frequency – A summary statistic, resulting from a simple model of the data, typically the mean. • SPM 1 st level is an extra step in the analysis, which models the response of one subject. The statistic generated (β) then taken forward to the GLM. – This is possible because βs are normally distributed. • A series of 3 -D matrices (β values, error terms)

Behind button-clicking… • Which images are produced and calculated when I press ‘run’? Behind button-clicking… • Which images are produced and calculated when I press ‘run’?

1 st level design matrix: 6 sessions per subject 1 st level design matrix: 6 sessions per subject

The following images are created each time an analysis is performed (1 st or The following images are created each time an analysis is performed (1 st or 2 nd 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. • Res. MS. img An image of the variance of the error (NB: this image is used to produce spm. T images). • RPV. img The estimated resels per voxel (not currently used). • All images can be displayed using check-reg button

1 st-level (within-subject) ^ b 1 Beta images contain values related to size of 1 st-level (within-subject) ^ b 1 Beta images contain values related to size of effect. A ^ given voxel in each beta image will have a value related 1 to the size of effect for that explanatory variable. ^ b 2 ^ ^ b 3 ^ 3 The ‘goodness of fit’ or error term is contained in the Res. MS 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. ^ b 4 ^ b 5 ^ b 6 ^ = within-subject error w

t masks Mask. img Calculated using the intersection of 3 masks: 1) Implicit (if t masks Mask. img Calculated using the intersection of 3 masks: 1) Implicit (if a zero in any image then masked for all images) default = yes 2) Thresholding which can be i) none, ii) absolute, iii) relative to global (80%). 3) Explicit mask (user specified) Single subject mask Segmentati on of structural images Group mask Note: You can include explicit mask at 1 st- or 2 nd-level. If include at 1 st-level, the resulting group mask at 2 ndlevel is the overlapping regions of masks at 1 stlevel so, will probably much smaller than single subject masks.

Beta value = % change above global mean. In this design matrix there are 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.

Res. MS. img = residual sum of squares or variance image and is a Res. MS. img = residual sum of squares or variance image and is a measure of withinsubject error at the 1 st level or betweensubject error at the 2 nd. Con. value is combined with Res. MS value at that voxel to produce a T statistic or spm. T. img.

spm. T. img Thresholded using the results button. spm. T. img Thresholded using the results button.

spm. T. img and corresponding spm. F. img spm. T. img and corresponding spm. F. img

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

The buttons and what follows. . • Specify 2 nd-level • Enter the output The buttons and what follows. . • Specify 2 nd-level • Enter the output dir • Enter con images from each subject as ‘scans’ • PS: Using matlabbatch, you can run several design matrices for different contrasts all at once • Hit ‘run’ • Click ‘estimate’ (may take a little while) • Click ‘results’ (can ‘review’ first before this)

A few additional notes… A few additional notes…

Effort How to enter contrasts… E 1 E 2 Reward R 1 R 2 Effort How to enter contrasts… E 1 E 2 Reward R 1 R 2 E 1 E 2 Main effect 1 1 -1 -1 of Reward Main effect 1 of Effort x 1 Reward -1 1 -1 -1 -1 1 Interaction: RE 1 x RE 2 = (R 1 E 1 – R 1 E 2) – (R 2 E 1– R 2 E 2) = R 1 E 1 – R 1 E 2 – R 2 E 1 + R 2 E 2 = 1 - 1 + 1 = [ 1 -1 -1 1]

Levels of Inference • Three levels of inference: – extreme voxel values ® voxel-level Levels of Inference • Three levels of inference: – extreme voxel values ® voxel-level (height) inference – big suprathreshold clusters voxel-level: P(t 4. 37) =. 048 ® cluster-level (extent) inference – many suprathreshold clusters n=1 2 ® set-level inference n=82 Set level: At least 3 clusters above threshold Cluster level: At least 2 cluster with at least 82 voxels above threshold Voxel level: at least cluster with unspecified number of voxels above threshold Which is more powerful? Set > cluster > voxel level Can use voxel level threshold for a priori hypotheses about specific voxels. n=32 cluster-level: P(n 82, t u) = 0. 029 set-level: P(c 3, n k, t u) = 0. 019

Example SPM window Example SPM window

Global Effects • May be global variation from scan to scan • Such “global” Global Effects • May be global variation from scan to scan • Such “global” changes in image intensity confound local / regional changes of experiment • global Adjust for global effects (for f. MRI) by: Proportional Scaling • • Can improve statistics when orthogonal to effects of interest (as here)… …but can also worsen when effects of interest correlated with global (as next) Scaling global

Global Effects • Two types of scaling: Grand Mean scaling and Global scaling • Global Effects • Two types of scaling: Grand Mean scaling and Global scaling • Grand Mean scaling is automatic, global scaling is optional • Grand Mean scales by 100/mean over all voxels and ALL scans (i. e, single number per session) • Global scaling scales by 100/mean over all voxels for EACH scan (i. e, a different scaling factor every scan) • Problem with global scaling is that TRUE global is not (normally) known… • …we only estimate it by the mean over voxels • So if there is a large signal change over many voxels, the global estimate will be confounded by local changes • This can produce artifactual deactivations in other regions after global scaling • Since most sources of global variability in f. MRI are low frequency (drift), high-pass filtering may be sufficient, and many people to not use global scaling

Small-volume correction • If have an a priori region of interest, no need to Small-volume correction • If have an a priori region of interest, no need to correct for wholebrain! • But can correct for a Small Volume (SVC) • Volume can be based on: – An anatomically-defined region – A geometric approximation to the above (eg rhomboid/sphere) – A functionally-defined mask (based on an ORTHOGONAL contrast!) • Extent of correction can be APPROXIMATED by a Bonferonni correction for the number of resels…(cf. Random Field Theory slides) • . . but correction also depends on shape (surface area) as well as size (volume) of region (may want to smooth volume if rough)

Example SPM window Example SPM window

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

Statistical inference: imaging vs. behavioural data • Inference of imaging data uses some of Statistical inference: imaging vs. behavioural data • Inference of imaging data uses some of the same statistical tests as used for analysis of behavioral data: – t-tests, – ANOVA – The effect of covariates for the study of individualdifferences • Some tests are more typical in imaging: – Conjunction analysis • Multiple comparisons poses a greater problem in imaging (RFT; small volume correction)

With help from … • Rik Henson’s slides. • Debbie Talmi & Sarah White’s With help from … • Rik Henson’s slides. • Debbie Talmi & Sarah White’s slides • Alex Leff’s slides • SPM manual (D: spm 5man). • Human Brain Function book • Guillaume Flandin & Geoffrey Tan