Why N’ How (I forgot the title) Donald G. McLaren, Ph.D. Department of Neurology, MGH/HMS GRECC, ERNM Veteran’s Hospital

Slides:



Advertisements
Similar presentations
2nd level analysis in fMRI
Advertisements

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
Outline What is ‘1st level analysis’? The Design matrix
Jennifer Siegel. Statistical background Z-Test T-Test Anovas.
Basics of fMRI Group Analysis Douglas N. Greve. 2 fMRI Analysis Overview Higher Level GLM First Level GLM Analysis First Level GLM Analysis Subject 3.
Statistical Signal Processing for fMRI
The General Linear Model Or, What the Hell’s Going on During Estimation?
Classical inference and design efficiency Zurich SPM Course 2014
Correlation and Regression Analysis
Lorelei Howard and Nick Wright MfD 2008
1st Level Analysis Design Matrix, Contrasts & Inference
General Linear Model & Classical Inference
General Linear Model & Classical Inference Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM M/EEGCourse London, May.
2nd Level Analysis Jennifer Marchant & Tessa Dekker
Inference for regression - Simple linear regression
Methods for Dummies Second level analysis
Basics of fMRI Inference Douglas N. Greve. Overview Inference False Positives and False Negatives Problem of Multiple Comparisons Bonferroni Correction.
With a focus on task-based analysis and SPM12
Brain Mapping Unit The General Linear Model A Basic Introduction Roger Tait
7/16/2014Wednesday Yingying Wang
General Linear Model & Classical Inference London, SPM-M/EEG course May 2014 C. Phillips, Cyclotron Research Centre, ULg, Belgium
Analysis of fMRI data with linear models Typical fMRI processing steps Image reconstruction Slice time correction Motion correction Temporal filtering.
SPM Course Zurich, February 2015 Group Analyses Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London With many thanks to.
FMRI Methods Lecture7 – Review: analyses & statistics.
Various topics Petter Mostad Overview Epidemiology Study types / data types Econometrics Time series data More about sampling –Estimation.
SPM short course – Oct Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
Group analyses of fMRI data Methods & models for fMRI data analysis November 2012 With many thanks for slides & images to: FIL Methods group, particularly.
MGS3100_04.ppt/Sep 29, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Regression Sep 29 and 30, 2015.
Basics of fMRI Time-Series Analysis Douglas N. Greve.
FMRI ROI Analysis 7/18/2014 Friday Yingying Wang
Correction for multiple comparisons in FreeSurfer
Contrasts & Statistical Inference
Spatial Smoothing and Multiple Comparisons Correction for Dummies Alexa Morcom, Matthew Brett Acknowledgements.
Multi session analysis using FEAT David Field Thanks to…. Tom Johnstone, Jason Gledhill, FMRIB.
The General Linear Model (for dummies…) Carmen Tur and Ashwani Jha 2009.
Methods for Dummies Second level Analysis (for fMRI) Chris Hardy, Alex Fellows Expert: Guillaume Flandin.
Statistical Analysis An Introduction to MRI Physics and Analysis Michael Jay Schillaci, PhD Monday, April 7 th, 2007.
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,
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.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
The General Linear Model Christophe Phillips SPM Short Course London, May 2013.
The General Linear Model Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM fMRI Course London, October 2012.
SPM short course – Mai 2008 Linear Models and Contrasts Jean-Baptiste Poline Neurospin, I2BM, CEA Saclay, France.
General Linear Model & Classical Inference London, SPM-M/EEG course May 2016 Sven Bestmann, Sobell Department, Institute of Neurology, UCL
General Linear Model & Classical Inference Short course on SPM for MEG/EEG Wellcome Trust Centre for Neuroimaging University College London May 2010 C.
General Linear Model & Classical Inference
The general linear model and Statistical Parametric Mapping
The General Linear Model
2nd Level Analysis Methods for Dummies 2010/11 - 2nd Feb 2011
Introduction to Permutation for Neuroimaging HST
The General Linear Model (GLM)
Contrasts & Statistical Inference
The General Linear Model
The general linear model and Statistical Parametric Mapping
The General Linear Model
The General Linear Model (GLM)
Contrasts & Statistical Inference
Chapter 3 General Linear Model
The General Linear Model
The General Linear Model
The General Linear Model
Contrasts & Statistical Inference
MGS 3100 Business Analysis Regression Feb 18, 2016
Presentation transcript:

Why N’ How (I forgot the title) Donald G. McLaren, Ph.D. Department of Neurology, MGH/HMS GRECC, ERNM Veteran’s Hospital 11/15/2012

Types of Data

Types of Data – Dependent Variable Task Data – Single Condition – Multiple Conditions – Multiple Predictors Per Condition Functional Connectivity – Correlation Functional Connectivity -- ICA Context-Dependent Connectivity VBM DTI Other??

Factors, Levels, Groups, Classes Continuous Variables/Factors: Age, IQ, Volume, Behavioral measures (emotional scale, memory ability), Images, etc. Discrete Variables/Factors: Gender, Handedness, Diagnosis Levels of Discrete : Handedness: Left and Right Gender: Male and Female Diagnosis: Normal, MCI, AD Group or Class: Specification of All Discrete Factors: Left-handed Male MCI Right-handed Female Normal

Overview From a line to the GLM and matrices Statistical Tests Contrasts Designs Power Caveats

General Linear Model (GLM) Y=aX+b

GLM Theory HRF Amplitude IQ, Height, Weight Independent Variable Is Activity correlated with Age? Dependent Variable, Measurement x1x2 y2 y1 Subject 1 Subject 2 Activity Age Of course, you ’ d need more then two subjects …

Linear Model Intercept: b Slope: m Activity Age x1x2 y2 y1 System of Linear Equations y1 = 1*b + x1*m y2 = 1*b + x2*m Y = X*  y1 y2 1 x1 1 x2 bmbm =* Matrix Formulation X = Design Matrix  = Regression Coefficients = Parameter estimates = “ betas ” = Intercepts and Slopes bmbm  Intercept = Offset

Hypotheses and Contrasts Is Activity correlated with Age? Does m = 0? Null Hypothesis: H0: m=0 Intercept: b Slope: m Activity Age x1x2 y2 y1 m= [0 1]* bmbm  = C*  ? C=[0 1]: Contrast Matrix bmbm  y1 y2 1 x1 1 x2 bmbm =*

Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 Intercept: b Slope: m Activity Age x1x2 y2 y1 b= [1 0]* bmbm  = C*  ? C=[1 0]: Contrast Matrix bmbm  y1 y2 1 x1 1 x2 bmbm =*

Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 Intercept: b Slope: m Activity Age x1x2 y2 y1 b= [1 0]* bmbm  = C*  ? C=[1 0]: Contrast Matrix bmbm  y1 y2 1 x1 1 x2 bmbm =*

Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 Intercept: b Activity Age x1x2 y2 y1 b= [1 0]* bmbm  = C*  ? C=[1 0]: Contrast Matrix bmbm  y1 y2 1 x1 bmbm =*

Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 Intercept: b Activity Age x1x2 y2 y1 b= [1 ]* b  = C*  ? C=[1 0]: Contrast Matrix b  y1 y b =*

More than Two Data Points y1 = 1*b + x1*m y2 = 1*b + x2*m y3 = 1*b + x3*m y4 = 1*b + x4*m y1 y2 y3 y4 1 x1 1 x2 1 x3 1 x4 bmbm =* Y = X*  +n Intercept: b Slope: m Activity Age Model Error Noise Uncertainty

The General Linear Model observed = predicted + random error In Matrix Form

Summary of the GLM Y = X. β + ε Observed data: Imaging uses a mass univariate approach – that is each voxel is treated as a separate column vector of data. Y is Dependent Brain Value at various subjects/time points at a single voxel Design matrix: Several components which explain the observed data, i.e. the BOLD time series for the voxel Timing info: onset vectors, O m j, and duration vectors, D m j HRF, h m, describes shape of the expected BOLD response over time Other regressors, e.g. realignment parameters At the group level: these are covariates or grouping columns (see later slide) Parameters: Define the contribution of each component of the design matrix to the value of Y Estimated so as to minimise the error, ε, i.e. least sums of squares Error: Difference between the observed data, Y, and that predicted by the model, Xβ. Not assumed to be spherical in fMRI

Brain Imaging From the beginning (almost)…. [ ]

25 Spatial Normalization, Atlas Space Subject 1 Subject 2 Subject 1 Subject 2 MNI305 Native SpaceMNI305 Space

26 Group Analysis Does not have to be all positive! Contrast Amplitudes Contrast Amplitudes Variances (Error Bars)

Mass Univariate Analyses (1) Run the GLM for each voxel. (2) Compute the statistic from the GLM for each voxel (3) Inferences

28 Statistical Parametric Map (SPM) +3% 0% -3% Contrast Amplitude CON, COPE, CES Contrast Amplitude Variance (Error Bars) VARCOPE, CESVAR Significance t-Map (p,z,F) (Thresholded p<.01) sig=-log10(p) “ Massive Univariate Analysis ” -- Analyze each voxel separately

SPM/FSL/AFNI/CUSTOM It is important to recognize that all programs that utilize the GLM will produce the same result. However, if your design matrices or variance correction methods are different, then you will see differences. Some slides show illustrations from FSL, others show illustrations from SPM, MATLAB, or other software. These can be done in all programs.

Types Of Analysis

32 “ Random Effects (RFx) ” Analysis RFx

33 “ Random Effects (RFx) ” Analysis RFx Model Subjects as a Random Effect Variance comes from a single source: variance across subjects –Mean at the population mean –Variance of the population variance Does not take first-level noise into account (assumes 0) “ Ordinary ” Least Squares (OLS) Usually less activation than individuals

34 “ Mixed Effects (MFx) ” Analysis MFx RFx Down-weight each subject based on variance. Weighted Least Squares vs ( “ Ordinary ” LS)

35 “ Mixed Effects (MFx) ” Analysis MFx Down-weight each subject based on variance. Weighted Least Squares vs ( “ Ordinary ” LS) Protects against unequal variances across group or groups ( “ heteroskedasticity ” ) May increase or decrease significance with respect to simple Random Effects More complicated to compute “ Pseudo-MFx ” – simply weight by first-level variance (easier to compute)

36 “ Fixed Effects (FFx) ” Analysis FFx RFx

37 “ Fixed Effects (FFx) ” Analysis FFx As if all subjects treated as a single subject (fixed effect) Small error bars (with respect to RFx) Large DOF Same mean as RFx Huge areas of activation Not generalizable beyond sample.

38 Population vs Sample Group Population (All members) Hundreds? Thousands? Billions? Sample 18 Subjects Do you want to draw inferences beyond your sample? Does sample represent entire population? Random Draw?

39 fMRI Analysis Overview Higher Level GLM First Level GLM Analysis First Level GLM Analysis Subject 3 First Level GLM Analysis Subject 4 First Level GLM Analysis Subject 1 Subject 2 CX CX CX CX Preprocessing MC, STC, B0 Smoothing Normalization Preprocessing MC, STC, B0 Smoothing Normalization Preprocessing MC, STC, B0 Smoothing Normalization Preprocessing MC, STC, B0 Smoothing Normalization Raw Data CX

Second-Level Modeling These are all random effects (because of variance corrections and using beta’s from the first level) Mean across subjects divided by variance across subjects. – Low subjects with very low variance between them can lead to a significant finding, even if no subject was significant at the single subject level – Implications for analysis (e.g. SLBT??)

Statistical Tests

Implementing the T-test Variance Estimate Sqrt(Var*c T (X T X) -1 c) c = T = contrast of estimated parameters t-test H 0 : c T  = 0 variance estimate

Implementing the F-test F = error variance estimate additional variance accounted for by effects of interest H 0 : c T  = 0 c =

Contrasts and the Full Model

T/r/F Notes If F is a single row contrast, then F=T^2 An F-test has no direction In many programs, T-tests are one-tailed, thus have a p-value half of the same F-test There are formulas to convert between T/r and other statistics (e.g. cohen’s d) To avoid double-dipping, when you extract an ROI to plot the correlation and get the correlation value, DO NOT make inferences from the plots, but from the voxel-wise analysis.

Contrasts Identify the Null Hypothesis – Ho: A=B Make the Null Hypothesis equal 0 – Ho: A-B=0 Identify the columns for A and B, apply their weights – Ho: 1*A+(-1)*B – Contrast  [1 -1]

Contrasts What if A and B are not individual columns as in the case of A1,A2,B1,B2… – [ ] would work, but will over estimate the magnitude of the effect – A is the average A1 A2, or Ho: (A1+A2)/2=0 [½ ½ 0 0] – B is the average B1 B2, or Ho: (B1+B2)/2=0 [0 0 ½ ½] – [½ ½ -½ -½]

51 Higher Level GLM Analysis = GG y = X *  Data from one voxel Design Matrix (Regressors) Vector of Regression Coefficients ( “ Betas ” ) Observations (Low-Level Contrasts) Contrast Matrix: C = [1] Contrast = C*  =  G One-Sample Group Mean (OSGM)

52 Two Groups GLM Analysis =  G1  G2 y = X *  Data from one voxel Observations (Low-Level Contrasts)

53 Contrasts: Two Groups GLM Analysis 1. Does Group 1 by itself differ from 0? Ho:  G1 =0; Contrast = C*  =  G1 ; C = [1 0] =  G1  G Does Group 2 by itself differ from 0? Ho:  G2 =0; Contrast = C*  =  G2 ; C = [0 1] 3. Does Group 1 differ from Group 2? Ho:  G1 =  G2; Contrast = C*  =  G1 -  G2; C = [1 -1] 4. Does either Group 1 or Group 2 differ from 0? C has two rows: F-test (vs t-test) Concatenation of contrasts #1 and # C =

54 One Group, One Covariate (Age) =  G  Age y = X *  Data from one voxel Observations (Low-Level Contrasts) Intercept:  G Slope:  Age Contrast Age

55 Contrasts: One Group, One Covariate 1.Does Group offset/intercept differ from 0? Does Group mean differ from 0 regressing out age? Ho:  G =0; Contrast = C*  =  G ; C = [1 0], (Treat age as nuisance) =  G  Age Does Slope differ from 0? Ho:  Age =0; Contrast = C*  =  Age ; C = [0 1] Intercept:  G Slope:  Age Contrast Age

56 Contrasts: One Group, One Mean- Centered Covariate =  G  Age Mean:  G Slope:  Age Contrast Age 1.Does Group offset/intercept differ from 0? Does Group mean differ from 0 regressing out age? Ho:  G =0; Contrast = C*  =  G ; C = [1 0], (Treat age as nuisance) 2. Does Slope differ from 0? Ho:  Age =0; Contrast = C*  =  Age ; C = [0 1], ** Same effect as non-mean centered covariate

Group Effects 1.Does Activity vary with Disease Status? 2.Does Activity vary with Gender? 1.Is there an Interaction between DS and G?

2x2 Group ANOVA While this design matrix was generated in SPM, you could generate it in any of the MRI Analysis packagees or statistical programs.

Contrasts Does Activity vary by Disease Status? – Ho: DS-=DS+ – Ho: DS- - DS+ =0 – [½ ½ -½ -½]; (group difference based on subgroups) or – [10/15 5/15 -13/22 -9/22] (pure average of subjects) Does Activity vary by Gender? – Ho: Male=Female – Ho: Male - Female =0 – [½ -½ ½ -½]; or (group difference based on subgroups) or – [10/23 -5/14 13/23 -9/14] (pure average of subjects)

Contrasts Average of Subgroups versus Average of Individuals – If you have drawn a random sample and want to talk generally about all subjects in a group, use the contrast weighted by group size. – If you haven’t drawn a random sample or want to look at the average effect of the group, then you want to use the contrast that is not weighted by group size.

Contrasts Is there an interaction? – Ho: DS-Females-DS-Males= DS+Females-DS+Males – Ho: (DS-Females-DS-Males) – (DS+Females-DS+Males)=0 – Ho: DS-Females-DS-Males – DS+Females+DS+Males=0 – [ ]; or Are the groups different? – Ho: DS-Females=DS-Males=DS+Females=DS+Males – F-test – DS-Females=DS-Males  [ ] – DS-Males=DS+Females  [ ] – DS+Females=DS+Males  [ ] – [ ; ; ]

Contrasts If there is an interaction, you can not interpret the effects of the individual factors (e.g. disease and gender)

GLM Important to model all known variables, even if not experimentally interesting: – e.g. head movement, block and subject effects – minimise residual error variance for better stats – effects-of-interest are the regressors you’re actually interested in covariates conditions: effects of interest

64 Contrasts: Two Groups GLM Analysis 1. Does Group 1 by itself differ from 0? Ho:  G1 =0; Contrast = C*  =  G1 ; C = [1 0] =  G1  G Does Group 2 by itself differ from 0? Ho:  G2 =0; Contrast = C*  =  G2 ; C = [0 1] 3. Does Group 1 differ from Group 2? Ho:  G1 =  G2; Contrast = C*  =  G1 -  G2; C = [1 -1] 4. Does either Group 1 or Group 2 differ from 0? C has two rows: F-test (vs t-test) Concatenation of contrasts #1 and # C =

65 One Group, One Covariate (Age) =  G  Age y = X *  Data from one voxel Observations (Low-Level Contrasts) Intercept:  G Slope:  Age Contrast Age

66 Contrasts: One Group, One Covariate 1.Does Group offset/intercept differ from 0? Does Group mean differ from 0 regressing out age (mean-centered)? Ho:  G =0; Contrast = C*  =  G ; C = [1 0], (Treat age as nuisance) =  G  Age Does Slope differ from 0? Ho:  Age =0; Contrast = C*  =  Age ; C = [0 1] Intercept:  G Slope:  Age Contrast Age

One Group, One Covariate (

Two Groups Do groups differ in Intercept? Do groups differ in Slope? Is average slope different than 0? … Intercept: b1 Slope: m1 Activity Age Intercept: b2 Slope: m2

Two Groups Intercept: b1 Slope: m1 Activity Age Intercept: b2 Slope: m2 y11 = 1*b1 + 0*b2 + x11*m1 + 0*m2 y12 = 1*b1 + 0*b2 + x12*m1 + 0*m2 y21 = 0*b1 + 1*b2 + 0*m1 + x21*m2 y22 = 0*b1 + 1*b2 + 0*m1 + x22*m2 y11 y12 y21 y x x x x22 b1 b2 m1 m2 = * Y = X* 

70 Two Groups, One Covariate Somewhat more complicated design Slopes may differ between the groups What are you interested in? Differences between intercepts? Ie, treat covariate as a nuisance? Differences between slopes? Ie, an interaction between group and covariate?

71 Two Groups, One (Nuisance) Covariate Is there a difference between the group means? Synthetic Data

72 Raw DataEffect of Age Effect After Age “ Regressed Out ” (e.g. Age=0) No difference between groups Groups are not well matched for age No group effect after accounting for age Age is a “ nuisance ” variable (but important!) Slope with respect to Age is same across groups If age was mean-centered, there might be a group effect!!! Depends on mean-centering… Two Groups, One (Nuisance) Covariate

73 =  G1  G2  Age y = X *  Data from one voxel Observations (Low-Level Contrasts) Two Groups, One (Nuisance) Covariate One regressor for Age. Different Offset Same Slope (DOSS)

74 =  G1  G2  Age Two Groups, One (Nuisance) Covariate One regressor for Age indicates that groups have same slope – makes difference between group means/intercepts independent of age. Different Offset Same Slope (DOSS)

75 Contrasts: Two Groups + Covariate 1. Does Group 1 intercept/mean differ from 0 (after regressing out effect of age)? Ho:  G1 =0, Contrast = C*  =  G1, C = [1 0 0] 2. Does Group 2 intercept/mean differ from 0 (after regressing out effect of age)? Ho:  G2 =0, Contrast = C*  =  G2, C = [0 1 0] 3. Does Group 1 intercept/mean differ from Group 2 intercept/mean (after regressing out effect of age)? Ho:  G1 =  G2,, Contrast = C*  =  G1 -  G2, C = [1 -1 0] =  G1  G2  Age Does Slope differ from 0 (after regressing out the effect of group)? Does not have to be a “ nuisance ” ! Ho:  Age =0, Contrast = C*  =  Age, C = [0 0 1]

Two-Groups, One Covariate, Same Slope 1,2 4 3 Model from previous slide (

77 Slope with respect to Age differs between groups Interaction between Group and Age Intercept different as well Group/Covariate Interaction Two Groups, One Covariate, Different Slopes

78 =  G1  G2  Age1  Age2 y = X *  Data from one voxel Observations (Low-Level Contrasts) Group-by-Age Interaction Different Offset Different Slope (DODS) Group/Covariate Interaction

79 1.Does Slope differ between groups? Is there an interaction between group and age? Ho:  Age1 =  Age2, Contrast = C*  =  Age1 -  Age2, C = [ ], Group/Covariate Interaction =  G1  G2  Age1  Age

80 Group/Covariate Interaction =  G1  G2  Age1  Age Does this contrast make sense? 2. Does Group 1 intercept/mean differ from Group 2 mean (after regressing out effect of age)? Ho:  G1 -  G2, Contrast = C*  =  G1 -  G2, C = [ ] Very tricky! This tests for difference at Age=0 What about Age = 12? What about Age = 20?

81 Group/Covariate Interaction If you are interested in the difference between the means but you are concerned there could be a difference (interaction) in the slopes: 1.Analyze with interaction model (DODS*) 2.Test for a difference in slopes 3.If there is no difference, re-analyze with single regressor model (DOSS*) 4.If there is a difference, proceed with caution * Freesurfer terms

Group/Covariate Interaction ( Model from previous slide 1 2

Mean Centering Across ALL subjects – Covariate-adjusted group means Within each group – Each group would have the same mean as a one-sample t- test Why does it matter? – The interpretation changes – Correlation between group and covariate (e.g. MMSE and Alzheimer’s diagnosis)

Covariates If you have a single group: – Demeaning covariate will not change the slope – Demeaning makes the group term the mean of the group; whereas not demeaning makes the group term the intercept.

Covariates If you have a multiple groups: – Demeaning covariate will not change the slope, no matter how you demean it – Demeaning within each group  controlling for the covariate, but group means are uneffected – Demeaning across everyone  controlling for the covariate, but group means are effected. If you do this, you should refer to group tests as a comparison of covariate-adjusted means

87 Longitudinal/Repeated-Measures Did something change between visits? Drug or Behavioral Intervention? Training? Disease Progression? Aging? Injury? Scanner Upgrade? Multiple tasks in the same session?

88 Longitudinal Paired Differences Between Subjects Subject 1, Visit 1 Subject 1, Visit 2

89 Longitudinal Paired Analysis = VV y = X *  Paired Diffs from one voxel Design Matrix (Regressors) Observations (V1-V2 Differences in Low-Level Contrasts) Ho:   V =0 Contrast = C*  =   V Contrast Matrix: C = [1] One-Sample Group Mean (OSGM): Paired t-Test

GLM – Paired T-Test

GLM – Repeated Measures

Constructing Contrasts

What is the null hypothesis? Make the null hypothesis equal to 0 Label the columns based on the weighting of the components of the null hypothesis – For repeated measures, form the sub-elements of the contrast, then apply the weights

Constructing Contrasts S1G1C1: [1 zeros(1,10) ] S1G1C2: [1 zeros(1,10) ] S2G1C1: [0 1 zeros(1,9) ] G1: [ones(1,6)/6 zeros(1,5) 1 0 1/3 1/3 1/3 1/3 1/3 1/ ] G1vsG2: [ones(1,6)/6 ones(1,5)/ /3 1/3 1/3 -1/3 -1/3 - 1/3] – (NOTE: This is not a valid contrast, even though it can be constructed.)

Contrast Validity Do you only have between-subject factors? – All contrasts valid Do you only have within-subject factors? – Any contrast comparing levels of a factor/interaction is valid – Effect of a single level is not valid Do you have between- and within-subject factors? – Any contrast comparing levels of a factor/interaction is valid – Interaction contrasts are valid – Group/between-subject effects are not valid (e.g. G1vG2) – Effect of a single level is not valid

Constructing Contrasts S1G1C1: [1 zeros(1,10) ] S1G1C2: [1 zeros(1,10) ] S2G1C1: [0 1 zeros(1,9) ] G1C1: [ones(1,6)/6 zeros(1,5) ] G2C1: [zeros(1,6) ones(1,5)/ ] *C1:[ones(1,6)/12 ones(1,5)/10 1/2 1/ / /2 0 0] *C1:[ones(1,11)/11 5/11 6/ / /11 0 0] C1vsC2: [zeros(1,11) /2 -1/2 0 1/2 -1/2 0 ] C1vsC2: [zeros(1,11) /11 -5/11 0 6/11 -6/11 0 ]

Power Calculations The probability that the test will reject the null hypothesis, when the null hypothesis is false. In general, you want to say that you have % power in your study. Estimate your effect size, specify your power, determine the sample size needed. CANNOT BE DONE POST-HOC!!!

Power Calculations Estimate your effect size – Which brain region? Minimum N to achieve % power in a set of regions (McLaren et al. 2010) – Where to find effect sizes? Previous studies, pilot studies Specify your power (option A) – The higher the better, but more power means a larger N Specify your N (option B) – Increasing N will increase the power

Power Calculations - $7600 study (Mumford et al. 2008)

Programs G*Power eSizeCalculation  voxel-wise eSizeCalculation

Caveat 1: What is analyzed… Missing Data – NaN – Zeros Also AFNI/FSL

Caveat 2: Designs Between-subject Designs Within-subject Designs Mixed Designs

Pick your design Carefully All of these designs test the same effect; however only the top 2 give you the correct RFX results and are generalizable to the population. The top right model is a variant of the GLM that creates a second error term (more on this next week).

Pick your design Carefully

Variance Corrections The issue of non-sphericity

Repeated Measures in FSL Limited to designs that have no violations of sphericity.

Misc. Considerations

Correction for Multiple Comparisons Cluster-based – Monte Carlo simulation – Permutation Tests – Surface Gaussian Random Fields (GRF) There but not fully tested False Discovery Rate (FDR) – built into tksurfer and QDEC. (Genovese, et al, NI 2002)

Clustering 1.Choose a voxel/vertex-wise threshold Eg, 2 (p<.01), or 3 (p<.001) Sign (pos, neg, abs) 2.A cluster is a group of connected (neighboring) voxels/vertices above a threshold 3.Cluster has a size (volume in mm 3 and area in mm 2 ) p<.01 (-log10(p)=2) Negative p<.0001 (-log10(p)=4) Negative

What to report in papers Be explicit about the model – What are the factors – What are the covariates – What did you set as the variance and dependence for each factor Be explicit about the contrast you are using Be explicit about how to interpret the contrast – Group means, group intercepts, covariate adjusted group means Be explicit about the thresholds used – Corrections for multiple comparisons – Small Volume Correction (corrected in SPM8 in late Feb. 2012)

SPM/FSL/AFNI/CUSTOM It is important to recognize that all programs that utilize the GLM will produce the same result. However, if your design matrices or variance correction methods are different, then you will see differences. Some slides show illustrations from FSL, others show illustrations from SPM, MATLAB, or other software. These can be done in all programs.

Useful Mailing Lists SPM – FSL -- Freesurfer -- CARET -- I highly recommend reading the posts on these lists as they will save you time in the future.